Sorting of passwd/group files

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



Tony Schreiner wrote:
> 
> sort -t: +0 /etc/passwd >outfile-byname
> sort -t: -n +2 /etc/passwd >outfile-byuid

I concur Kai, I use this method as well. Sometimes doing it by hand is a 
lot faster than a silly GUI app. :)

> for what purpose do you need this?

I can't speak for Kai, but here I have ranges of UIDs that are not very 
manageable via GUI tools (ie 1000 -> 1999 for employees, 2000 -> 2999 
for permanent contractors, 3000 -> 3999 for temporary contractors, 
ranges for services, CVS-only users, and so on and so forth).

Sorting by UID then makes it easy to glance and find the next UID in 
line to feed to useradd and LDAP.

-te

-- 
Troy Engel | Systems Engineer
Fluid Inc. | http://www.fluid.com

[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