groupmod.1m (2010 09)

g
groupmod(1M) groupmod(1M)
NAME
groupmod - modify a group on the system
SYNOPSIS
groupmod [-S alternate_password_file][
-g gid [-o]] [-n name][[-a|-m|-d ]
-l userlist ] group
DESCRIPTION
The groupmod command modifies a group on the system by altering the appropriate entry in the
/etc/group file.
The
groupmod command must be used with the group argument, which is the name of the group to be
modified. The name consists of a string of printable characters that may not include a colon (
:) or new-
line (
\n).
Refer to usergroupname(5) to understand the functionality changes with the Numeric User Group Name
feature.
Options
The
groupmod command uses the following options:
-S alternate_password_file
Specify the path to the alternate password file. When this option is specified, user infor-
mation is looked up in this file, instead of /etc/passwd.
If specified, the
-S option should used as the first option.
-g gid Change the value of the group ID to gid. gid must be a non-negative decimal integer less
than MAXUID as defined in the <param.h> header file.
-o Allow the gid to be non-unique (that is, a duplicate).
-n name Change the name of the group to name. name consists of a string of printable characters
that may not include a colon (:) or newline (\n).
-a Add userlist to the supplementary group membership list of group . It should be used in
conjunction with
-l option.
-m Modify the supplementary group membership list of group to userlist . It should be used
in conjunction with
-l option.
-d Delete userlist from the supplementary group membership list of group . It should be
used in conjunction with
-l option.
-l Specifies the list of users for modifying the supplementary group membership list of the
group. When options
-a, -m, and -d options are not specified, -m is assumed.
NIS
The
groupmod command is aware of NIS user entries. Only local groups may be modified with
group-
mod. Attempts to modify an NIS group will result in an error. NIS groups must be administered from
the NIS server. If groupmod is used on a system where NIS is installed, it may fail with the error
group x does not exist
(return value 6) if the group specified is an NIS group (see group(4)). However, NIS groups are checked
when verifying uniqueness of the new gid or new group name, which may result in the above error, or the
error
GID # is not unique
(return value 4).
RETURN VALUE
The
groupmod command exits with one of the following values:
0 No error.
2 Invalid command syntax.
3 Invalid argument supplied to an option.
4 gid is not unique (when -o is not used).
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (2 pages)