12.07.2015 Views

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Managing Groups 213Deleting GroupsTo delete a group, select it from the list on the Groups tab, and click the Delete button inthe toolbar. Click Yes to confirm the deletion. The changes take place immediately, andthe group is removed from the list of existing groups.CAUTIONThe application will not let you remove a group if it is the primary group for an existing user.Configuring via the Command LineIf you prefer command-line configuration or just don’t have the X Window Systeminstalled on the system, this section describes the command-line utilities that can be usedto manage groups.The commands discussed in this section must be executed by the root user.Adding GroupsThe groupadd command can be used to add user groups to the system. The basic syntax isgroupadd . If no command-line options are used, the group is created withthe next available GID above 499. To specify a GID, use the groupadd -g command. To add a system group, use the groupadd -r command.The first available GID below 500 is used for the system group. To add a system group andspecify the GID, use the groupadd -r -g command. Even if youspecify a GID for the system group, the GID still needs to be below 500 to follow thenumbering convention.To add users to a group, use the usermod -G command as previouslydiscussed in this chapter or the gpasswd command as discussed in the next section“Modifying Groups.”Modifying GroupsOther than adding users to the group, the name of the group and the GID of the groupcan be changed with the groupmod command. To change the GID of a group, use thegroupmod -g command. To change the name of the group, use thegroupmod -n command.<strong>Red</strong> <strong>Hat</strong> <strong>Enterprise</strong> <strong>Linux</strong> also includes the gpasswd command for managing groups. Itallows an administrator to configure group administrators, group members, and a grouppassword. Group administrators can add and delete users as well as set, change, or removethe group password. A group can have more than one group administrator.9To add group administrators, use the gpasswd -A command, where is a comma-separated list of existing users you want to be group administrators.Don’t use any spaces between the commas.The root user or a group administrator can add users to the group with the gpasswd -a command. Using this method, only one user can be added at a time.Similarly, to remove a user from a group, use the gpasswd -d command.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!