1GROUPADD(8)               System Management Commands               GROUPADD(8)
2
3
4

NAME

6       groupadd - create a new group
7

SYNOPSIS

9       groupadd [options] group
10

DESCRIPTION

12       The groupadd command creates a new group account using the values
13       specified on the command line plus the default values from the system.
14       The new group will be entered into the system files as needed.
15

OPTIONS

17       The options which apply to the groupadd command are:
18
19       -f, --force
20           This option causes the command to simply exit with success status
21           if the specified group already exists. When used with -g, and the
22           specified GID already exists, another (unique) GID is chosen (i.e.
23           -g is turned off).
24
25       -g, --gid GID
26           The numerical value of the group's ID. This value must be unique,
27           unless the -o option is used. The value must be non-negative. The
28           default is to use the smallest ID value greater than or equal to
29           GID_MIN and greater than every other group.
30
31           See also the -r option and the GID_MAX description.
32
33       -h, --help
34           Display help message and exit.
35
36       -K, --key KEY=VALUE
37           Overrides /etc/login.defs defaults (GID_MIN, GID_MAX and others).
38           Multiple -K options can be specified.
39
40           Example: -K GID_MIN=100-K GID_MAX=499
41
42           Note: -K GID_MIN=10,GID_MAX=499 doesn't work yet.
43
44       -o, --non-unique
45           This option permits to add a group with a non-unique GID.
46
47       -p, --password PASSWORD
48           The encrypted password, as returned by crypt(3). The default is to
49           disable the password.
50
51           Note: This option is not recommended because the password (or
52           encrypted password) will be visible by users listing the processes.
53
54           You should make sure the password respects the system's password
55           policy.
56
57       -r, --system
58           Create a system group.
59
60           The numeric identifiers of new system groups are chosen in the
61           SYS_GID_MIN-SYS_GID_MAX range, defined in login.defs, instead of
62           GID_MIN-GID_MAX.
63
64       -R, --root CHROOT_DIR
65           Apply changes in the CHROOT_DIR directory and use the configuration
66           files from the CHROOT_DIR directory.
67

CONFIGURATION

69       The following configuration variables in /etc/login.defs change the
70       behavior of this tool:
71
72       GID_MAX (number), GID_MIN (number)
73           Range of group IDs used for the creation of regular groups by
74           useradd, groupadd, or newusers.
75
76           The default value for GID_MIN (resp.  GID_MAX) is 1000 (resp.
77           60000).
78
79       MAX_MEMBERS_PER_GROUP (number)
80           Maximum members per group entry. When the maximum is reached, a new
81           group entry (line) is started in /etc/group (with the same name,
82           same password, and same GID).
83
84           The default value is 0, meaning that there are no limits in the
85           number of members in a group.
86
87           This feature (split group) permits to limit the length of lines in
88           the group file. This is useful to make sure that lines for NIS
89           groups are not larger than 1024 characters.
90
91           If you need to enforce such limit, you can use 25.
92
93           Note: split groups may not be supported by all tools (even in the
94           Shadow toolsuite). You should not use this variable unless you
95           really need it.
96
97       SYS_GID_MAX (number), SYS_GID_MIN (number)
98           Range of group IDs used for the creation of system groups by
99           useradd, groupadd, or newusers.
100
101           The default value for SYS_GID_MIN (resp.  SYS_GID_MAX) is 101
102           (resp.  GID_MIN-1).
103

FILES

105       /etc/group
106           Group account information.
107
108       /etc/gshadow
109           Secure group account information.
110
111       /etc/login.defs
112           Shadow password suite configuration.
113

CAVEATS

115       Groupnames may contain only lower and upper case letters, digits,
116       underscores, or dashes. They can end with a dollar sign. Dashes are not
117       allowed at the beginning of the groupname. Fully numeric groupnames and
118       groupnames . or .. are also disallowed. In regular expression terms:
119       [a-zA-Z0-9_.][a-zA-Z0-9_.-]*[$]?
120
121       Groupnames may only be up to 32 characters long.
122
123       You may not add a NIS or LDAP group. This must be performed on the
124       corresponding server.
125
126       If the groupname already exists in an external group database such as
127       NIS or LDAP, groupadd will deny the group creation request.
128

EXIT VALUES

130       The groupadd command exits with the following values:
131
132       0
133           success
134
135       2
136           invalid command syntax
137
138       3
139           invalid argument to option
140
141       4
142           GID not unique (when -o not used)
143
144       9
145           group name not unique
146
147       10
148           can't update group file
149

SEE ALSO

151       chfn(1), chsh(1), passwd(1), gpasswd(8), groupdel(8), groupmod(8),
152       login.defs(5), useradd(8), userdel(8), usermod(8).
153
154
155
156shadow-utils 4.1.5.1              03/14/2019                       GROUPADD(8)
Impressum