Re: Determine next UID number

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Wed, Oct 13, 2010 at 10:40 PM, Bowie Bailey <Bowie_Bailey@xxxxxxx> wrote:
>  On 10/13/2010 4:22 PM, Terry Polzin wrote:
>> On Wed, 2010-10-13 at 20:09 +0000, Joseph L. Casale wrote:
>>>> Is there an equivalent in CentOS?
>>> cat /etc/passwd |cut -d ":" -f 3 |sort -n NEXTUID=`expr $LASTUID + 1`
>>>
>>> ;)
>> LASTUID=`cat /etc/passwd |grep -v nologin|cut -d ":" -f 3 |sort -n |
>> tail -1`; NEXTUID=`expr $LASTUID + 1`; echo $NEXTUID
>
> That assumes the highest UID number has a login shell...
>
> --
> Bowie
> _______________________________________________


which is generally the case...


-- 
Kind Regards
Rudi Ahlers
SoftDux

Website: http://www.SoftDux.com
Technical Blog: http://Blog.SoftDux.com
Office: 087 805 9573
Cell: 082 554 7532
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos



[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux