Date: Sat, 12 Jun 2004 11:55:04 +0900 From: Rob <stopspam@users.sourceforge.net> To: freebsd-questions@freebsd.org Subject: Re: (add new users & groups) Message-ID: <40CA7088.7080308@users.sourceforge.net> In-Reply-To: <007501c45020$f40d62b0$0200a8c0@LLAPTOP> References: <004f01c4501c$6481c8b0$0200a8c0@LLAPTOP> <40CA60D7.1020504@users.sourceforge.net> <007501c45020$f40d62b0$0200a8c0@LLAPTOP>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?40CA7088.7080308>