'\"macro stdmacro
.if n .pH g1a.groupadd @(#)groupadd	40.10
.\" Copyright 1989 AT&T
.nr X
.if \nX=0 .ds x} groupadd 1M "Essential Utilities" "\&"
.if \nX=1 .ds x} groupadd 1M "Essential Utilities"
.if \nX=2 .ds x} groupadd 1M "" "\&"
.if \nX=3 .ds x} groupadd "" "" "\&"
.TH \*(x}
.SH NAME
\f4groupadd\fP \- add (create) a new group definition on the system
.SH SYNOPSIS
.nf
\f4groupadd \f1[\f4-g\f2 gid\f1 [\f4-o\f1]] \f2group\f1
.fi
.SH DESCRIPTION
The \f4groupadd\f1 command creates a new group definition on the system
by adding the appropriate entry to the \f4/etc/group\fP file.
.P
The following options are available:
.TP
\f4-g \f2gid\f1
The group id for the new group.
This group id must be a
non-negative decimal integer below MAXUID as defined in the <\f4param.h\f1> header file.
The group ID defaults to the next available (unique) number above the
highest number currently assigned.
For example, if groups 100, 105, and 200 are assigned as groups, the
next default group number will be 201.
(Group IDs from 0-99 are reserved.)
.TP
\f4-o\f1
This option allows the \f2gid\f1 to be duplicated (non-unique).
.TP
\f2group\f1
A string of printable characters that specifies the name of the new
group.
It may not include a colon (:) or newline (\\\\n).
.SH FILES
\f4/etc/group\fP
.SH SEE ALSO
groupdel(1M),
groupmod(1M),
logins(1M),
useradd(1M),
userdel(1M),
usermod(1M),
users(1).
.SH DIAGNOSTICS
The \f4groupadd\f1 command exits with one of the following values:
.TP
\f40\f1
Success.
.TP
\f42\f1
Invalid command syntax.
A usage message for the \f4groupadd\f1 command is displayed.
.TP
\f43\f1
An invalid argument was provided to an option.
.TP
\f44\f1
\f2gid\f1 is not unique (when \f4-o\f1 option is not used).
.TP
\f49\f1
\f2group\f1 is not unique.
.TP
\f410\f1
Cannot update the \f4/etc/group\f1 file.


