[CentOS] Determine next UID number

Terry Polzin foxec208 at wowway.com
Wed Oct 13 16:22:57 EDT 2010


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`
> 
> ;)
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
LASTUID=`cat /etc/passwd |grep -v nologin|cut -d ":" -f 3 |sort -n |
tail -1`; NEXTUID=`expr $LASTUID + 1`; echo $NEXTUID



More information about the CentOS mailing list