groupadd(1M)


groupadd -- add (create) a new group definition on the system

Synopsis

groupadd [-g gid [-o]] [-K path] group

Description

The groupadd command creates a new group definition on the system by adding the appropriate entry to the /etc/group file.

The following options are available:


-g gid
The group ID for the new group. This group ID must be a non-negative decimal integer below MAXUID as defined in the <param.h> header file. By default, a unique group ID is allocated in the valid range. Group IDs from 0-99 are reserved.

-K path
The pathname of a directory containing two customization scripts, groupadd.pre and groupadd.post, to be executed before and after creation of the group, respectively.

-o
This option allows the gid to be duplicated (non-unique).

group
A string of printable characters that specifies the name of the new group. It may not include a colon (:) or newline (\n).
If group is preceded by a ``+'' or ``-'' character, (for example, ``+student''), the group definition will be administered by the Network Information Service (NIS). Values for the -g and -o options will be silently ignored if these options are specified. Instead, the value for group ID will be taken from the NIS database. See group(4) for more information.

Files

/etc/group

Diagnostics

The groupadd command exits with 0 on success, or displays error messages under the following conditions:

References

groupdel(1M), groupmod(1M), logins(1M), useradd(1M), userdel(1M), usermod(1M), users(1bsd), group(4)
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004