6324 Add an `ndp' tool for manipulating the neighbors table
[illumos-gate.git] / usr / src / man / man1m / groupmod.1m
blob4de0725555f5f8d2ffe4a4a89febda088c918b15
1 '\" te
2 .\"  Copyright 1989 AT&T  Copyright (c) 1997, Sun Microsystems, Inc.  All Rights Reserved
3 .\" 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.
4 .\" 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.
5 .\" 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]
6 .TH GROUPMOD 1M "Aug 27, 2008"
7 .SH NAME
8 groupmod \- modify a group definition on the system
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fB/usr/sbin/groupmod\fR [\fB-g\fR \fIgid\fR [\fB-o\fR]] [\fB-n\fR \fIname\fR] \fIgroup\fR
13 .fi
15 .SH DESCRIPTION
16 .sp
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 .sp
22 .LP
23 The following options are supported:
24 .sp
25 .ne 2
26 .na
27 \fB\fB-g\fR \fIgid\fR\fR
28 .ad
29 .RS 11n
30 Specify the new group \fBID\fR for the group. This group \fBID\fR must be a
31 non-negative decimal integer less than \fBMAXUID\fR, as defined in
32 \fB<param.h>\fR\&. The group \fBID\fR defaults to the next available (unique)
33 number above 99. (Group IDs from 0-99 are reserved by SunOS for future
34 applications.)
35 .RE
37 .sp
38 .ne 2
39 .na
40 \fB\fB-n\fR \fIname\fR\fR
41 .ad
42 .RS 11n
43 Specify the new name for the group.  The \fIname\fR argument is a string of no
44 more than eight bytes consisting of characters from the set of lower case
45 alphabetic characters and numeric characters.  A warning message will be
46 written if these restrictions are not met.  A future Solaris release may refuse
47 to accept group fields that do not meet these requirements.  The \fIname\fR
48 argument must contain at least one character and must not include a colon
49 (\fB:\fR) or \fBNEWLINE\fR (\fB\en\fR).
50 .RE
52 .sp
53 .ne 2
54 .na
55 \fB\fB-o\fR\fR
56 .ad
57 .RS 11n
58 Allow the \fIgid\fR to be duplicated (non-unique).
59 .RE
61 .SH OPERANDS
62 .sp
63 .LP
64 The following operands are supported:
65 .sp
66 .ne 2
67 .na
68 \fB\fIgroup\fR\fR
69 .ad
70 .RS 9n
71 An existing group name to be modified.
72 .RE
74 .SH EXIT STATUS
75 .sp
76 .LP
77 The \fBgroupmod\fR utility exits with one of the following values:
78 .sp
79 .ne 2
80 .na
81 \fB\fB0\fR\fR
82 .ad
83 .RS 6n
84 Success.
85 .RE
87 .sp
88 .ne 2
89 .na
90 \fB\fB2\fR\fR
91 .ad
92 .RS 6n
93 Invalid command syntax. A usage message for the \fBgroupmod\fR command is
94 displayed.
95 .RE
97 .sp
98 .ne 2
99 .na
100 \fB\fB3\fR\fR
102 .RS 6n
103 An invalid argument was provided to an option.
107 .ne 2
109 \fB\fB4\fR\fR
111 .RS 6n
112 \fIgid\fR is not unique (when the \fB-o\fR option is not used).
116 .ne 2
118 \fB\fB6\fR\fR
120 .RS 6n
121 \fIgroup\fR does not exist.
125 .ne 2
127 \fB\fB9\fR\fR
129 .RS 6n
130 \fIname\fR already exists as a group name.
134 .ne 2
136 \fB\fB10\fR\fR
138 .RS 6n
139 Cannot update the \fB/etc/group\fR file.
142 .SH FILES
144 .ne 2
146 \fB\fB/etc/group\fR\fR
148 .RS 14n
149 group file
152 .SH SEE ALSO
155 \fBusers\fR(1B), \fBgroupadd\fR(1M), \fBgroupdel\fR(1M), \fBlogins\fR(1M),
156 \fBuseradd\fR(1M), \fBuserdel\fR(1M), \fBusermod\fR(1M), \fBgroup\fR(4),
157 \fBattributes\fR(5)
158 .SH NOTES
161 The \fBgroupmod\fR utility only modifies group definitions in the
162 \fB/etc/group\fR file. If a network name service such as \fBNIS\fR or
163 \fBNIS+\fR is being used to supplement the local \fB/etc/group\fR file with
164 additional entries, \fBgroupmod\fR cannot change information supplied by the
165 network name service. The \fBgroupmod\fR utility will, however, verify the
166 uniqueness of group name and group \fBID\fR against the external name service.
169 \fBgroupmod\fR fails if a group entry (a single line in \fB/etc/group\fR)
170 exceeds 2047 characters.