1groupadd(1M) System Administration Commands groupadd(1M)
2
3
4
6 groupadd - add (create) a new group definition on the system
7
9 /usr/sbin/groupadd [-g gid [-o]] group
10
11
13 The groupadd command creates a new group definition on the system by
14 adding the appropriate entry to the /etc/group file.
15
17 The following options are supported:
18
19 -g gid Assigns the group id gid for the new group. This group id
20 must be a non-negative decimal integer below MAXUID as
21 defined in /usr/include/sys/param.h. The group ID defaults to
22 the next available (unique) number above the highest number
23 currently assigned. For example, if groups 100, 105, and
24 200 are assigned as groups, the next default group number
25 will be 201. (Group IDs from 0−99 are reserved by SunOS for
26 future applications.)
27
28
29 -o Allows the gid to be duplicated (non-unique).
30
31
33 The following operands are supported:
34
35 group A string consisting of characters from the set of lower case
36 alphabetic characters and numeric characters. A warning mes‐
37 sage will be written if the string exceeds MAXGLEN, which is
38 usually set at eight characters. The group field must contain
39 at least one character; it accepts lower case or numeric char‐
40 acters or a combination of both, and must not contain a colon
41 (:) or NEWLINE.
42
43
45 The following exit values are returned:
46
47 0 Successful completion.
48
49
50 2 Invalid command syntax. A usage message for the groupadd command
51 is displayed.
52
53
54 3 An invalid argument was provided to an option.
55
56
57 4 The gid is not unique (when -o option is not used).
58
59
60 9 The group is not unique.
61
62
63 10 The /etc/group file cannot be updated.
64
65
67 o /etc/group
68
69 o /usr/include/userdefs.h
70
72 See attributes(5) for descriptions of the following attributes:
73
74
75
76
77 ┌─────────────────────────────┬─────────────────────────────┐
78 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
79 ├─────────────────────────────┼─────────────────────────────┤
80 │Availability │SUNWcsu │
81 └─────────────────────────────┴─────────────────────────────┘
82
84 users(1B), groupdel(1M), groupmod(1M), grpck(1M), logins(1M), pwck(1M),
85 useradd(1M), userdel(1M), usermod(1M), group(4), attributes(5)
86
88 groupadd only adds a group definition to the local system. If a network
89 name service such as NIS or NIS+ is being used to supplement the local
90 /etc/group file with additional entries, groupadd cannot change infor‐
91 mation supplied by the network name service. However, groupadd will
92 verify the uniqueness of group name and group ID against the external
93 name service.
94
95
96 If the number of characters in a group entry exceeds 2047, group main‐
97 tenance commands, such as groupdel(1M) and groupmod(1M), fail.
98
99
100
101SunOS 5.11 27 Aug 2008 groupadd(1M)