From owner-freebsd-questions@FreeBSD.ORG Fri Mar 3 15:07:42 2006 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2BB3F16A420 for ; Fri, 3 Mar 2006 15:07:42 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from pi.codefab.com (pi.codefab.com [199.103.21.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id BE2FA43D45 for ; Fri, 3 Mar 2006 15:07:41 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from localhost (localhost [127.0.0.1]) by pi.codefab.com (Postfix) with ESMTP id 24AC95CF5; Fri, 3 Mar 2006 10:07:41 -0500 (EST) Received: from pi.codefab.com ([127.0.0.1]) by localhost (pi.codefab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 77657-01; Fri, 3 Mar 2006 10:07:40 -0500 (EST) Received: from [192.168.1.3] (pool-68-161-83-14.ny325.east.verizon.net [68.161.83.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pi.codefab.com (Postfix) with ESMTP id E261A5C99; Fri, 3 Mar 2006 10:07:39 -0500 (EST) Message-ID: <44085BC2.2060608@mac.com> Date: Fri, 03 Mar 2006 10:07:46 -0500 From: Chuck Swiger Organization: The Courts of Chaos User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: Kristian Vaaf References: <7.0.1.0.2.20060303152354.022c0d48@broadpark.no> In-Reply-To: <7.0.1.0.2.20060303152354.022c0d48@broadpark.no> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at codefab.com Cc: questions@freebsd.org Subject: Re: Users and groups properly organized? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Mar 2006 15:07:42 -0000 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