9086 account administration manpages need some tlc
[unleashed.git] / usr / src / man / man1m / groupmod.1m
blob670777c7dfc8d29e73c8d89d89da6d9a050cc33a
1 '\" te
2 .\" Copyright (c) 2018 Peter Tribble.
3 .\"  Copyright 1989 AT&T  Copyright (c) 1997, Sun Microsystems, Inc.  All Rights Reserved
4 .\" 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.
5 .\" 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.
6 .\" 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]
7 .TH GROUPMOD 1M "Jan 7, 2018"
8 .SH NAME
9 groupmod \- modify a group definition on the system
10 .SH SYNOPSIS
11 .LP
12 .nf
13 \fB/usr/sbin/groupmod\fR [\fB-g\fR \fIgid\fR [\fB-o\fR]] [\fB-n\fR \fIname\fR] \fIgroup\fR
14 .fi
16 .SH DESCRIPTION
17 .LP
18 The \fBgroupmod\fR command modifies the definition of the specified group by
19 modifying the appropriate entry in the \fB/etc/group\fR file.
20 .SH OPTIONS
21 .LP
22 The following options are supported:
23 .sp
24 .ne 2
25 .na
26 \fB\fB-g\fR \fIgid\fR\fR
27 .ad
28 .RS 11n
29 Specify the new group \fBID\fR for the group. This group \fBID\fR must be a
30 non-negative decimal integer less than \fBMAXUID\fR, as defined in
31 \fB<sys/param.h>\fR\&. The group \fBID\fR defaults to the next available
32 (unique) number above 99. (Group IDs from 0-99 are reserved for future
33 applications.)
34 .RE
36 .sp
37 .ne 2
38 .na
39 \fB\fB-n\fR \fIname\fR\fR
40 .ad
41 .RS 11n
42 Specify the new name for the group.  The \fIname\fR argument is a string of no
43 more than eight bytes consisting of characters from the set of lower case
44 alphabetic characters and numeric characters.  A warning message will be
45 written if these restrictions are not met.  A future release may refuse
46 to accept group fields that do not meet these requirements.  The \fIname\fR
47 argument must contain at least one character and must not include a colon
48 (\fB:\fR) or \fBNEWLINE\fR (\fB\en\fR).
49 .RE
51 .sp
52 .ne 2
53 .na
54 \fB\fB-o\fR\fR
55 .ad
56 .RS 11n
57 Allow the \fIgid\fR to be duplicated (non-unique).
58 .RE
60 .SH OPERANDS
61 .LP
62 The following operands are supported:
63 .sp
64 .ne 2
65 .na
66 \fB\fIgroup\fR\fR
67 .ad
68 .RS 9n
69 An existing group name to be modified.
70 .RE
72 .SH EXIT STATUS
73 .LP
74 The \fBgroupmod\fR utility exits with one of the following values:
75 .sp
76 .ne 2
77 .na
78 \fB\fB0\fR\fR
79 .ad
80 .RS 6n
81 Success.
82 .RE
84 .sp
85 .ne 2
86 .na
87 \fB\fB2\fR\fR
88 .ad
89 .RS 6n
90 Invalid command syntax. A usage message for the \fBgroupmod\fR command is
91 displayed.
92 .RE
94 .sp
95 .ne 2
96 .na
97 \fB\fB3\fR\fR
98 .ad
99 .RS 6n
100 An invalid argument was provided to an option.
104 .ne 2
106 \fB\fB4\fR\fR
108 .RS 6n
109 \fIgid\fR is not unique (when the \fB-o\fR option is not used).
113 .ne 2
115 \fB\fB6\fR\fR
117 .RS 6n
118 \fIgroup\fR does not exist.
122 .ne 2
124 \fB\fB9\fR\fR
126 .RS 6n
127 \fIname\fR already exists as a group name.
131 .ne 2
133 \fB\fB10\fR\fR
135 .RS 6n
136 Cannot update the \fB/etc/group\fR file.
139 .SH FILES
140 .ne 2
142 \fB\fB/etc/group\fR\fR
144 .RS 14n
145 group file
148 .SH SEE ALSO
150 \fBgroupadd\fR(1M), \fBgroupdel\fR(1M), \fBlogins\fR(1M),
151 \fBuseradd\fR(1M), \fBuserdel\fR(1M), \fBusermod\fR(1M), \fBgroup\fR(4),
152 \fBattributes\fR(5)
153 .SH NOTES
155 The \fBgroupmod\fR utility only modifies group definitions in the
156 \fB/etc/group\fR file. If a network name service
157 is being used to supplement the local \fB/etc/group\fR file with
158 additional entries, \fBgroupmod\fR cannot change information supplied by the
159 network name service. The \fBgroupmod\fR utility will, however, verify the
160 uniqueness of group name and group \fBID\fR against the external name service.
163 \fBgroupmod\fR fails if a group entry (a single line in \fB/etc/group\fR)
164 exceeds 2047 characters.