From owner-freebsd-questions@FreeBSD.ORG Sat Jun 12 02:56:40 2004 Return-Path: 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 3A85F16A4CE for ; Sat, 12 Jun 2004 02:56:40 +0000 (GMT) Received: from auk2.snu.ac.kr (auk2.snu.ac.kr [147.46.100.32]) by mx1.FreeBSD.org (Postfix) with ESMTP id CF6E843D31 for ; Sat, 12 Jun 2004 02:56:39 +0000 (GMT) (envelope-from stopspam@users.sourceforge.net) Received: from [147.46.44.181] (stopspam@users.sourceforge.net) by auk2.snu.ac.kr (Terrace Internet Messaging Server) with ESMTP id 2004061211:54:54:543799.13435.2379205552 for ; Sat, 12 Jun 2004 11:54:54 +0900 (KST) Message-ID: <40CA7088.7080308@users.sourceforge.net> Date: Sat, 12 Jun 2004 11:55:04 +0900 From: Rob User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040507 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <004f01c4501c$6481c8b0$0200a8c0@LLAPTOP> <40CA60D7.1020504@users.sourceforge.net> <007501c45020$f40d62b0$0200a8c0@LLAPTOP> In-Reply-To: <007501c45020$f40d62b0$0200a8c0@LLAPTOP> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-TERRACE-SPAMMARK: NO (SR:6.70) (by Terrace) Subject: Re: (add new users & groups) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jun 2004 02:56:40 -0000 LW Ellis wrote: > OK, I got that part down.. > (sysinstall and adding the user) > I've ordered a FreeBSD book based on the recommendations I received here > (this list) > Until then I'm pretty much shooting in the dark, learning as I go. > > I'm not clear on the Unix group/user setup >>From what I have read, FreeBSD will place users in a default group > Do I need a group? I will have about 6 users (not all at once) > DO I add a group before users? > Will it be to my benefit down the road to make a group now? Every 'thing' in Unix should be a "user" and belong to a "group". These are basically numbers: user-ID and group-ID. So everytime you add a user to the system, that user will also get a group-ID. On my system I am user "1001", and in group "1005". The files /etc/passwd and /etc/group map these numbers to nice names. On my system these numbers map to the user-group names "lahaye" and "surfion", for example. These user-IDs and group-IDs are the essential part of permissions in Unix. Permissions that (dis)allow a user to view or execute files; to browse directries etc. etc. Do an "ls -l" and you see to which user/group the files and directories belong. E.g: $ ls -l .xsession -rwxr-xr-x 1 lahaye surfion 613 Apr 10 19:58 .xsession (As an aside, sometimes, by mistake, files or directories have a user or group ID that is not listed in /etc/passwd and/or /etc/group; in that case the system cannot do the mapping to nice names, and you get the bare numbers!). The user/group concept clarify who can access what. For example, there is you, your family members, and the big world outside. Say you add yourself as user=leon, group=ellis Then add your brother, father etc. as user=john, group=ellis user=dad, group=ellis When you create a file, you then decide who can access this file. 1) Only you (none of the family members, neither the outside world) 2) You and all family members 3) Everybody (you, family and everybody else) To make things a little more complicated: you can specify this separately for 'reading', 'writing', and 'executing'. See the "chmod" command for details. This is a starting point for learning more on the basics of Unix and its files/directories permission strategy. Happy Unixing, Rob.