Date: Fri, 03 Mar 2006 10:07:46 -0500 From: Chuck Swiger <cswiger@mac.com> To: Kristian Vaaf <vaaf@broadpark.no> Cc: questions@freebsd.org Subject: Re: Users and groups properly organized? Message-ID: <44085BC2.2060608@mac.com> In-Reply-To: <7.0.1.0.2.20060303152354.022c0d48@broadpark.no> References: <7.0.1.0.2.20060303152354.022c0d48@broadpark.no>
next in thread | previous in thread | raw e-mail | index | archive | help
Kristian Vaaf wrote: [ ... ] > Have you all ever had a look at your /etc/master.passwd and /etc/group? Yes. Most people who edit these files by hand try to keep them in order, but... > Stupid question. But notice the user and group identifications being thrown > about as if they didn't matter. ...it doesn't matter much to FreeBSD; the system doesn't care. That information is generally accessed via a hash table in persistent service daemons, although there is plenty of userland code which does linear access patterns via getpwent(), getpwnam(), etc. Unless you've got thousands or tens of thousands of user accounts, there won't be a noticeable difference. > To me they do, and I would like some order > in my system. Starting with my user and group identifications. > > Can I do something like this? > > find -s . -uid foo | xargs chown bar > find -s . -gid foo | xargs chgrp bar I suppose, but I would avoid making sweeping changes like that outside of people's home directories. You will reset (and therefore break) setuid- and setgid- bits of executables if you run this against /usr. > To be able to arrange master.passwd like this, > where UIDs and GIDs go by a chronological order? > > nobody:*:55555:55555::0:0:Unprivileged:/nonexistent:/usr/sbin/nologin > root:$1$xsL49xbt$of5hvUCiVT/b/D3B70bZv1:0:0::0:0:Core:/root:/usr/local/bin/zsh Also, obviously one does not want to mail your root password, even encrypted, to a public mailing list. You should promptly switch to using a new password.... [ ... ] > Maybe such order, harmony or balance or whatever will help > boost system performance? Just a superstitious thought. Cheers! :) If you make a change and you feel your system is more organized as a result, that's a fine thing. You might find using vipw to change the passwd file a good idea. -- -Chuck
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44085BC2.2060608>