Content-type: text/html Man page of groupadd

groupadd

Section: Maintenance Commands (8)
Index Return to Main Contents
 

NAME

groupadd - Adds a new group definition  

SYNOPSIS

/usr/sbin/groupadd [-g gid [-o]] [-x extended_option] group_name  

FLAGS

Specifies the group identifier (GID) of the new group being added. The GID must be a non-negative decimal integer. Allows a group identification (GID) number to be duplicated (non-unique). This flag can be used only with the -g flag. The following extended_option attributes are available: Indicates that the group is distributed. The value of the distributed=n attribute can be 0 or 1. If set to 0, the group is added to the local system. If set to 1, the group is added to the NIS master database on the running system. Indicates that the group is local. The value of the local=n attribute can be 0 or 1. If set to 1, the group is added to the local database. If set to 0, the group information is added to the NIS master database. Specifies the name of the new group. The group name can be any printable characters, with the exception of the colon (:) and newline (\n) characters.  

DESCRIPTION

The groupadd command lets the system administrator create new groups on the system, by specifying the group name and GID. When the GID is not specified (with the -g flag), the GID defaults to the next available (unique) number.

The -x flag lets the system administrator specify whether the new group is local or distributed over a network. If this flag is not specified on the command line, the system adds the new group to the appropriate database as specified by the system defaults.

The default behavior on the system for the groupadd command is distributed=0 and local=1. With these values, the system adds the group to the local database by default. Setting the distributed= and local= attributes to the same value (for example, distributed=0 and local=0) produces an error.

You must have superuser privilege to execute this command.  

EXAMPLES

The following example adds the group, newgroup, to the group database with a system-provided GID: % groupadd newgroup

The following example adds the group, newgroup, to the group database with a GID of 451: % groupadd -g 451 newgroup

The following example adds the group, newgroup, to the NIS master database: % groupadd -x distributed=1 newgroup  

EXIT VALUES

The groupadd command exits with one of the following values: Success Invalid command syntax or insufficient privilege. A usage message for the groupadd command or an error message is displayed. An invalid argument was provided to an option. The GID is not unique. The GID is invalid. The group name is not unique. Cannot update the group database.  

FILES

The groupadd command operates on files for the specific level of system security.  

RELATED INFORMATION

Commands:  groupdel(8), groupmod(8), useradd(8), userdel(8), usermod(8)

Documents:  System Administration, Security delim off


 

Index

NAME
SYNOPSIS
FLAGS
DESCRIPTION
EXAMPLES
EXIT VALUES
FILES
RELATED INFORMATION

This document was created by man2html, using the manual pages.
Time: 02:40:29 GMT, October 02, 2010