Is there a program on CentOS which will sort my passwd/group etc. files by username or uid/gid? On Suse I can do this with a sysconfig switch and Suseconfig, is there something similar on RH-based systems? Kai -- Kai Sch?tzl, Berlin, Germany Get your web at Conactive Internet Services: http://www.conactive.com
On Mar 31, 2006, at 11:31 AM, Kai Schaetzl wrote:> Is there a program on CentOS which will sort my passwd/group etc. > files by > username or uid/gid? On Suse I can do this with a sysconfig switch and > Suseconfig, is there something similar on RH-based systems? > > Kai > > -- > Kai Sch?tzl, Berlin, Germany > Get your web at Conactive Internet Services: http://www.conactive.com >e.g. sort -t: +0 /etc/passwd >outfile-byname sort -t: -n +2 /etc/passwd >outfile-byuid ? for what purpose do you need this? Tony
Tony Schreiner wrote:> > sort -t: +0 /etc/passwd >outfile-byname > sort -t: -n +2 /etc/passwd >outfile-byuidI 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
Try the GUI: # system-config-users HTH Oliver Kai Schaetzl wrote:> Is there a program on CentOS which will sort my passwd/group etc. files by > username or uid/gid? On Suse I can do this with a sysconfig switch and > Suseconfig, is there something similar on RH-based systems? > > Kai > >-- Oliver Schulze L. <oliver@samera.com.py>
On Fri, 2006-03-31 at 18:31 +0200, Kai Schaetzl wrote:> Is there a program on CentOS which will sort my passwd/group etc. files by > username or uid/gid? On Suse I can do this with a sysconfig switch and > Suseconfig, is there something similar on RH-based systems?pwck and grpck will do this, too. -David