9086 account administration manpages need some tlc
[unleashed.git] / usr / src / man / man1m / groupadd.1m
blob6029feb6c5dace890bf593be231f3acb4929722d
1 '\" te
2 .\" Copyright (c) 2018 Peter Tribble.
3 .\"  Copyright 1989 AT&T  Copyright (c) 1998 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 GROUPADD 1M "Jan 7, 2018"
8 .SH NAME
9 groupadd \- add (create) a new group definition on the system
10 .SH SYNOPSIS
11 .LP
12 .nf
13 \fB/usr/sbin/groupadd\fR [\fB-g\fR \fIgid\fR [\fB-o\fR]] \fIgroup\fR
14 .fi
16 .SH DESCRIPTION
17 .LP
18 The \fBgroupadd\fR command creates a new group definition on the system by
19 adding the appropriate entry to 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 10n
29 Assigns the group id \fIgid\fR for the new group. This group id must be a
30 non-negative decimal integer below \fBMAXUID\fR as defined in
31 \fB<sys/param.h>\fR. The group \fBID\fR defaults to the next
32 available (unique) number above the highest number currently assigned. For
33 example, if groups \fB100\fR, \fB105\fR, and \fB200\fR are assigned as
34 groups, the next default group number will be \fB201\fR. (Group \fBIDs\fR from
35 \fB0\fR\(mi\fB99\fR are reserved for future applications.)
36 .RE
38 .sp
39 .ne 2
40 .na
41 \fB\fB-o\fR\fR
42 .ad
43 .RS 10n
44 Allows the \fIgid\fR to be duplicated (non-unique).
45 .RE
47 .SH OPERANDS
48 .LP
49 The following operands are supported:
50 .sp
51 .ne 2
52 .na
53 \fB\fIgroup\fR\fR
54 .ad
55 .RS 9n
56 A string consisting of characters from the set of lower case alphabetic
57 characters and numeric characters. A warning message will be written if the
58 string exceeds \fBMAXGLEN,\fR which is usually set at eight characters. The
59 \fIgroup\fR field must contain at least one character; it accepts lower case or
60 numeric characters or a combination of both, and must not contain a colon
61 (\fB:\fR) or \fBNEWLINE.\fR
62 .RE
64 .SH EXIT STATUS
65 .LP
66 The following exit values are returned:
67 .sp
68 .ne 2
69 .na
70 \fB\fB0\fR\fR
71 .ad
72 .RS 6n
73 Successful completion.
74 .RE
76 .sp
77 .ne 2
78 .na
79 \fB\fB2\fR\fR
80 .ad
81 .RS 6n
82 Invalid command syntax. A usage message for the \fBgroupadd\fR command is
83 displayed.
84 .RE
86 .sp
87 .ne 2
88 .na
89 \fB\fB3\fR\fR
90 .ad
91 .RS 6n
92 An invalid argument was provided to an option.
93 .RE
95 .sp
96 .ne 2
97 .na
98 \fB\fB4\fR\fR
99 .ad
100 .RS 6n
101 The \fIgid\fR is not unique (when \fB-o\fR option is not used).
105 .ne 2
107 \fB\fB9\fR\fR
109 .RS 6n
110 The \fIgroup\fR is not unique.
114 .ne 2
116 \fB\fB10\fR\fR
118 .RS 6n
119 The \fB/etc/group\fR file cannot be updated.
122 .SH FILES
123 .RS +4
125 .ie t \(bu
126 .el o
127 \fB/etc/group\fR
129 .RS +4
131 .ie t \(bu
132 .el o
133 \fB/usr/include/userdefs.h\fR
135 .SH SEE ALSO
137 \fBgroupdel\fR(1M), \fBgroupmod\fR(1M), \fBgrpck\fR(1M),
138 \fBlogins\fR(1M), \fBpwck\fR(1M), \fBuseradd\fR(1M), \fBuserdel\fR(1M),
139 \fBusermod\fR(1M), \fBgroup\fR(4), \fBattributes\fR(5)
140 .SH NOTES
142 \fBgroupadd\fR only adds a group definition to the local system. If a network
143 name service is being used to supplement the
144 local \fB/etc/group\fR file with additional entries, \fBgroupadd\fR cannot
145 change information supplied by the network name service. However,
146 \fBgroupadd\fR will verify the uniqueness of group name and group \fBID\fR
147 against the external name service.
150 If the number of characters in a \fBgroup\fR entry exceeds 2047, group
151 maintenance commands, such as \fBgroupdel\fR(1M) and \fBgroupmod\fR(1M), fail.