Managing users and groups has traditionally been tedious. Red Hat Linux has a few tools and conventions that make user and groups easier to manage, and more useful.
The easiest way to manage users and groups is through the Users and Groups module of the control-panel (see section 8 for details on the control-panel and section 8.1 for details on the Users and Groups module).
You can also use adduser to create a new user from the command line.
Table 54 lists the standard users set up by the installation process (this is essentially the /etc/passwd file). The group id (GID) in this table is the primary group for the user. See section 10.3.3 for details on how groups are used.
User | UID | GID | Home Directory | Shell |
root | 0 | 0 | /root | /bin/bash |
bin | 1 | 1 | /bin | |
daemon | 2 | 2 | /sbin | |
adm | 3 | 4 | /var/adm | |
lp | 4 | 7 | /var/spool/lpd | |
sync | 5 | 0 | /sbin | /bin/sync |
shutdown | 6 | 0 | /sbin | /sbin/shutdown |
halt | 7 | 0 | /sbin | /sbin/halt |
8 | 12 | /var/spool/mail | ||
news | 9 | 13 | /var/spool/news | |
uucp | 10 | 14 | /var/spool/uucp | |
operator | 11 | 0 | /root | /bin/bash |
games | 12 | 100 | /usr/local/games | |
gopher | 13 | 30 | /usr/lib/gopher-data | |
ftp | 14 | 50 | /usr/rhs/ftp | |
nobody | 99 | 99 | /root |
Table 55 lists the standard groups as set up by the installation process (this is essentially the /etc/group file).
Group | GID | Members |
root | 0 | root |
bin | 1 | root,bin,daemon |
daemon | 2 | root,bin,daemon |
sys | 3 | root,bin,adm |
adm | 4 | root,adm,daemon |
tty | 5 | |
disk | 6 | root |
lp | 7 | daemon,lp |
mem | 8 | |
kmem | 9 | |
wheel | 10 | root |
12 | ||
news | 13 | news |
uucp | 14 | uucp |
man | 15 | |
games | 20 | |
gopher | 30 | |
dip | 40 | |
ftp | 50 | ftp |
nobody | 99 | |
users | 100 |
Red Hat Linux uses a user private group (UPG) scheme, which makes UNIX groups much easier to use. The UPG scheme does not add or change anything in the standard UNIX way of handling groups. It simply offers a new convention for handling groups. Whenever you create a new user, by default, he or she has a unique group. The scheme works as follows:
Most computing sites like to create a group for each major project and assign people to the groups they need to be in. Managing files traditionally has been difficult, though, because when someone creates a file it is owned by the primary group he or she belongs to. When a single person works on multiple projects, it becomes hard to make the files owned by the group that is associated with that project. In the UPG scheme, groups are automatically assigned to files on a project-by-project basis, which makes managing group projects very simple.
Let's say you have a big project called devel, with many people editing the devel files in a devel directory. Make a group called devel, chgrp the devel directory to devel, and add the all the devel users to the devel group. Now, all the devel users will be able to edit the devel files and create new files in the devel directory, and these files will always retain their devel group. Thus, they will always be edit-able by other devel users.
If you have multiple projects like devel, and users who are working on multiple projects, these users will never have to change their umask or group when they move from project to project. The SGID bit on each project's main directory ``selects'' the proper group.
Since each user's HOME directory is owned by the user and their private group, it is safe to set the SGID bit on the HOME directory. However, by default, files are created with the primary group of the user, so the SGID bit would be redundant.
Since the UPG scheme is new, many people have questions about it, and they wonder why it is necessary. The following is the rationale for the scheme.
and you add the proper users to the group.chown -R root.emacs /usr/lib/emacs/site-lisp
chmod 775 /usr/lib/emacs/site-lisp
which causes everything in the directory to be created with the ``emacs'' group.chmod 2775 /usr/lib/emacs/site-lisp
At this point, by making the default umask 002 and giving everyone a private default group, you can easily set up groups that users can take advantage of without doing any magic. Just create the group, add the users, and do the above chown and chmod on the group's directories.