hpux 10.20 - groupmod (1)
NAME
groupmod - modify a group on the system
SYNOPSIS
groupmod [-g gid [-o] ] [-n name] 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.
Options
The groupmod command may be used with the following options:
-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 (i.e., 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).
NETWORKING FEATURES
This command is aware of NIS user entries. Only local groups may be
modified with groupmod. 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 VALUES
groupmod 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).
6 group does not exist.
9 group is not unique.
10 Cannot modify the /etc/group file.
11 /etc/passwd file or /etc/ptmp file busy. Another command may
be modifying the /etc/passwd file.
12 Unable to open /etc/ptmp file or the /etc/passwd file is
non-existent.
EXAMPLES
Change the group ID of the group project2 to 111 in the file
/etc/group if the group project2 exists. This is done even if the
group ID 111 is already in use.
groupmod -g 111 -o project2
Change the name of project2 to project22 in the file /etc/group if the
group project22 does not already exist.
groupmod -n project22 project2
WARNINGS
As many users may try to write the /etc/passwd file simultaneously, a
passwd locking mechanism was deviced. If this locking fails after
subsequent retrying, groupmod terminates.
FILES
/etc/group
/etc/ptmp
SEE ALSO
users(1), groupadd(1M), groupdel(1M), logins(1M), useradd(1M),
userdel(1M), usermod(1M), group(4).
STANDARDS CONFORMANCE
groupmod: SVID3