2007-10-07 17:16:52 +05:30
. \" ** You probably do not want to edit this file directly **
2007-10-07 17:17:01 +05:30
. \" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
2007-10-07 17:16:52 +05:30
. \" Instead of manually editing it, you probably should edit the DocBook XML
. \" source for it and then use the DocBook XSL Stylesheets to regenerate it.
2007-10-07 17:17:11 +05:30
.TH "GROUPADD" "8" "01/02/2006" "System Management Commands" "System Management Commands"
2007-10-07 17:16:52 +05:30
. \" disable hyphenation
.nh
. \" disable justification (adjust text to left margin only)
.ad l
.SH "NAME"
2007-10-07 17:14:44 +05:30
groupadd \- Create a new group
2007-10-07 17:16:25 +05:30
.SH "SYNOPSIS"
.HP 9
2007-10-07 17:17:11 +05:30
\fB groupadd\fR [\- g\ \fI GID\fR \ [\-o]] [\-f] [\-K\ \fIKEY\fR=\fIVALUE\fR] \fI group\fR
2007-10-07 17:16:25 +05:30
.SH "DESCRIPTION"
.PP
2007-10-07 17:17:01 +05:30
The
\fB groupadd\fR
2007-10-07 17:16:52 +05:30
command creates a new group account using the values specified on the command line and the default values from the system. The new group will be entered into the system files as needed.
2007-10-07 17:16:25 +05:30
.SH "OPTIONS"
.PP
2007-10-07 17:17:01 +05:30
The options which apply to the
\fB groupadd\fR
2007-10-07 17:16:52 +05:30
command are:
2007-10-07 17:16:25 +05:30
.TP
\fB \- f\fR
2007-10-07 17:17:01 +05:30
This option causes to just exit with success status if the specified group already exists. With
2007-10-07 17:17:11 +05:30
\fB \- g\fR , if specified GID already exists, other (unique) GID is chosen (i.e.
2007-10-07 17:17:01 +05:30
\fB \- g\fR
2007-10-07 17:16:52 +05:30
is turned off).
2007-10-07 17:16:25 +05:30
.TP
2007-10-07 17:17:01 +05:30
\fB \- g\fR \fI GID\fR
The numerical value of the group's ID. This value must be unique, unless the
\fB \- o\fR
2007-10-07 17:16:52 +05:30
option is used. The value must be non\- negative. The default is to use the smallest ID value greater than 999 and greater than every other group. Values between 0 and 999 are typically reserved for system accounts.
2007-10-07 17:16:34 +05:30
.TP
2007-10-07 17:17:01 +05:30
\fB \- h\fR , \fB \- \- help\fR
Display help message and exit.
.TP
2007-10-07 17:16:52 +05:30
\fB \- K \fR \fB \fI KEY\fR \fR \fB =\fR \fB \fI VALUE\fR \fR
2007-10-07 17:17:01 +05:30
Overrides /etc/login.defs defaults (GID_MIN, GID_MAX and others). Multiple
\fB \- K\fR
options can be specified.
.sp
Example:
\fB \- K \fR \fI GID_MIN\fR =\fI 100\fR \fB \- K \fR \fI GID_MAX\fR =\fI 499\fR
.sp
Note:
\fB \- K \fR \fI GID_MIN\fR =\fI 10\fR ,\fI GID_MAX\fR =\fI 499\fR
2007-10-07 17:16:52 +05:30
doesn't work yet.
2007-10-07 17:16:34 +05:30
.TP
\fB \- o\fR
2007-10-07 17:17:01 +05:30
This option permits to add group with non\- unique GID.
2007-10-07 17:16:25 +05:30
.SH "FILES"
.TP
\fI /etc/group\fR
group account information
.TP
\fI /etc/gshadow\fR
secure group account information
2007-10-07 17:17:01 +05:30
.TP
\fI /etc/login.defs\fR
shadow password suite configuration
.SH "CAVEATS"
.PP
Groupnames must begin with a lower case letter or an underscore, and only lower case letters, underscores, dashes, and dollar signs may follow. In regular expression terms: [a\- z_][a\- z0\- 9_\- ]*[$]
.PP
Groupnames may only be up to 16 characters long.
2007-10-07 17:17:11 +05:30
.PP
If the groupname already exists in an external group database such as NIS,
\fB groupadd\fR
will deny the group creation request.
.PP
Groupnames may only be up to 16 characters long.
2007-10-07 17:16:25 +05:30
.SH "EXIT VALUES"
.PP
2007-10-07 17:17:01 +05:30
The
\fB groupadd\fR
command exits with the following values:
2007-10-07 17:16:25 +05:30
.TP
\fI 0\fR
success
.TP
\fI 2\fR
invalid command syntax
.TP
\fI 3\fR
invalid argument to option
.TP
\fI 4\fR
2007-10-07 17:17:11 +05:30
GID not unique (when
2007-10-07 17:17:01 +05:30
\fB \- o\fR
not used)
2007-10-07 17:16:25 +05:30
.TP
\fI 9\fR
group name not unique
.TP
\fI 10\fR
2007-10-07 17:16:52 +05:30
can't update group file
2007-10-07 17:16:25 +05:30
.SH "SEE ALSO"
.PP
2007-10-07 17:17:01 +05:30
\fB chfn\fR (1),
\fB chsh\fR (1),
\fB passwd\fR (1),
\fB gpasswd\fR (8),
\fB groupdel\fR (8),
\fB groupmod\fR (8),
\fB login.defs\fR (5),
\fB useradd\fR (8),
\fB userdel\fR (8),
\fB usermod\fR (8).