Linux

Group Commands

NAME

     groupadd - Create a new group

SYNOPSIS

     groupadd [-g gid [-o]] [-r] [-f] group

DESCRIPTION

The groupadd command creates a new group account using the values specified on the command line and the default values from the system. The new group will be entered into the system files as needed. The options which apply to the groupadd command are

     -g gid

The numerical value of the group's ID. This value must be unique, unless the -o option is used. The value must be non-negative. The default is to use the smallest ID value greater than 500 and greater than every other group. Values between 0 and 499 are typically reserved for system accounts.

     -r

This flag instructs groupadd to add a system account. The first available gid lower than 499 will be automatically selected unless the -g option is also given on the command line. This is an option added by Red Hat.

     -f

This is the force flag. This will cause groupadd to exit with an error when the group about to be added already exists on the system. If that is the case, the group won't be altered (or added again). This option also modifies the way -g option works. When you request a gid that it is not unique and you don't specify the -o option too, the group creation will fall back to the standard behavior (adding a group as if neither -g or -o options were specified). This is an option added by Red Hat.


NAME

     groupmod - Modify a group  

SYNOPSIS

     groupmod [-g gid [-o]] [-n group_name ] group  

DESCRIPTION

The groupmod command modifies the system account files to reflect the changes that are specified on the command line. The options which apply to the groupmod command are

     -g gid

The numerical value of the group's ID. This value must be unique, unless the -o option is used. The value must be non-negative. Values between 0 and 99 are typically reserved for system groups. Any files which the old group ID is the file group ID must have the file group ID changed manually.

     -n group_name

The name of the group will be changed from group to group_name.


NAME

     groupdel - Delete a group  

SYNOPSIS

     groupdel group  

DESCRIPTION

The groupdel command modifies the system account files, deleting all entries that refer to group. The named group must exist. You must manually check all filesystems to insure that no files remain with the named group as the file group ID.


NAME

     groups -- show group memberships

SYNOPSIS

     groups [user]

DESCRIPTION

The groups utility has been obsoleted by the id(1) utility, and is equivalent to ``id -Gn [user]''. The command ``id -p'' is suggested for normal interactive use.

The groups utility displays the groups to which you (or the optionally specified user) belong.

EXIT STATUS

     The groups utility exits 0 on success, and >0 if an error occurs.

PmWiki

pmwiki.org

Blix theme adapted by David Gilbert, powered by PmWiki