Groups

All users belong to one or more groups. Just as each file has a specific owner, each file belongs to a particular group as well. The group might be specific to the owner of the file, or may be a group shared by all users. The ability to read, write or execute a file can be assigned to a group; this is separate from the owner's rights. For example, the owner of a file will be able to write to a document, while other group members may only be able to read it.

Creating a Group

To create a new group:

You may see a filter screen, depending upon the settings in Control => Filters. Either provide a filter, or select Accept to bypass the filter.

Figure 14-7. User Groups Screen

Select Add at the bottom of the User groups screen.

Figure 14-8. Group Specification Screen

Enter a group name. You may also wish to specify members of the group; you can do so in the Alternate members field. The list of users should be space delimited, meaning that each username must have a space between it and the next one. Leave the Group name field blank, so that the system will assign a Group ID (GID) to your new group. When you're finished, select Accept and the group will be created.

Deleting a Group

To delete a group:

The group's files will still remain and their respective owners will still have sole control over them. The group name will be replaced with the deleted group's ID. The files may be assigned to a new group by using the chgrp command. More information on chgrp can be found by typing the command info chgrp or man chgrp at the shell prompt. If a new group is created and the deleted group's ID is specified, then the new group will have access to the deleted group's files. Linuxconf does not recycle used group numbers or used user IDs, so it won't happen by accident.

Modifying Group Membership

There are two ways to modify the list of users that belong to a group. You can either update each user account itself, or you can update the group definitions. In general, the fastest way is to update each of the group definitions. If you're planning on changing more information for each user than just the group information, then updating each user account may be simpler.

We'll start by detailing the group definitions method.

This will automatically update each user account with the group showing up in the Supplementary groups field if added or absent if removed.

Adding and removing groups can also be done by modifying each individual user account:

This will automatically update the group definitions. Repeat the process for each user.