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 999 and
29           greater than every other group. Values between 0 and 999 are
30           typically reserved for system accounts.
31
32       -h, --help
33           Display help message and exit.
34
35       -K, --key KEY=VALUE
36           Overrides /etc/login.defs defaults (GID_MIN, GID_MAX and others).
37           Multiple -K options can be specified.
38
39           Example: -K GID_MIN=100 -K GID_MAX=499
40
41           Note: -K GID_MIN=10,GID_MAX=499 doesn´t work yet.
42
43       -o, --non-unique
44           This option permits to add a group with a non-unique GID.
45
46       -p, --password PASSWORD
47           The encrypted password, as returned by crypt(3). The default is to
48           disable the password.
49
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 choosen in the
61           SYS_GID_MIN-SYS_GID_MAX range, defined in login.defs, instead of
62           GID_MIN-GID_MAX.
63

CONFIGURATION

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

FILES

95       /etc/group
96           Group account information.
97
98       /etc/gshadow
99           Secure group account information.
100
101       /etc/login.defs
102           Shadow password suite configuration.
103

CAVEATS

105       Groupnames may only be up to 32 characters long.
106
107       You may not add a NIS or LDAP group. This must be performed on the
108       corresponding server.
109
110       If the groupname already exists in an external group database such as
111       NIS or LDAP, groupadd will deny the group creation request.
112

EXIT VALUES

114       The groupadd command exits with the following values:
115
116       0
117           success
118
119       2
120           invalid command syntax
121
122       3
123           invalid argument to option
124
125       4
126           GID not unique (when -o not used)
127
128       9
129           group name not unique
130
131       10
132           can´t update group file
133

SEE ALSO

135       chfn(1), chsh(1), passwd(1), gpasswd(8), groupdel(8), groupmod(8),
136       login.defs(5), useradd(8), userdel(8), usermod(8).
137
138
139
140System Management Commands        07/24/2009                       GROUPADD(8)
Impressum