On Wed, Oct 13, 2010 at 16:40, 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 |That assumes the highest UID number has a login shell...
> tail -1`; NEXTUID=`expr $LASTUID + 1`; echo $NEXTUID
--
Bowie
I have been able to use things like these 2 examples (cat /etc/passwd | cut -d: -f3 | sort -n | tail -2 | head -1 in this case) but I want to get the next UID from the system not by parsing /etc/passwd
John
--
John Kennedy
--
John Kennedy
_______________________________________________ CentOS mailing list CentOS@xxxxxxxxxx http://lists.centos.org/mailman/listinfo/centos