xref: /illumos-gate/usr/src/man/man8/groupmod.8 (revision dd72704bd9e794056c558153663c739e2012d721)
te
Copyright (c) 2018 Peter Tribble.
Copyright 1989 AT&T Copyright (c) 1997, Sun Microsystems, Inc. All Rights Reserved
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
GROUPMOD 8 "Jan 7, 2018"
NAME
groupmod - modify a group definition on the system
SYNOPSIS

/usr/sbin/groupmod [-g gid [-o]] [-n name] group
DESCRIPTION

The groupmod command modifies the definition of the specified group by modifying the appropriate entry in the /etc/group file.

OPTIONS

The following options are supported: -g gid

Specify the new group ID for the group. This group ID must be a non-negative decimal integer less than MAXUID, as defined in <sys/param.h>. The group ID defaults to the next available (unique) number above 99. (Group IDs from 0-99 are reserved for future applications.)

-n name

Specify the new name for the group. The name argument is a string of no more than eight bytes consisting of characters from the set of lower case alphabetic characters and numeric characters. A warning message will be written if these restrictions are not met. A future release may refuse to accept group fields that do not meet these requirements. The name argument must contain at least one character and must not include a colon (:) or NEWLINE (\en).

-o

Allow the gid to be duplicated (non-unique).

OPERANDS

The following operands are supported: group

An existing group name to be modified.

EXIT STATUS

The groupmod utility exits with one of the following values: 0

Success.

2

Invalid command syntax. A usage message for the groupmod command is displayed.

3

An invalid argument was provided to an option.

4

gid is not unique (when the -o option is not used).

6

group does not exist.

9

name already exists as a group name.

10

Cannot update the /etc/group file.

FILES
/etc/group

group file

SEE ALSO

group (5), attributes (7), groupadd (8), groupdel (8), logins (8), useradd (8), userdel (8), usermod (8)

NOTES

The groupmod utility only modifies group definitions in the /etc/group file. If a network name service is being used to supplement the local /etc/group file with additional entries, groupmod cannot change information supplied by the network name service. The groupmod utility will, however, verify the uniqueness of group name and group ID against the external name service.

groupmod fails if a group entry (a single line in /etc/group) exceeds 2047 characters.