Linux

Ubuntu 9.04

Jaunty Jackalope

groupadd(8)


GROUPADD

NOM

groupadd − Créer un nouveau groupe

SYNOPSIS

groupadd [−g GID [−o]] [−f] [−K CLÃ=VALEUR] groupe

DESCRIPTION

The groupadd command creates a new group account using the values specified on the command line plus the default values from the system. The new group will be entered into the system files as needed.

OPTIONS

Les options disponibles pour la commande groupadd sont :

−f, −−force

This option causes the command to simply exit with success status if the specified group already exists. When used with −g, and the specified GID already exists, another (unique) GID is chosen (i.e. −g is turned off).

−g, −−gid GID

La valeur numérique de l´identifiant du groupe (« group ID » ou GID). Cette valeur doit être unique, à moins que l´option −o ne soit utilisée. La valeur ne doit pas être négative. Par défaut le plus petit identifiant plus grand que 999 et que les identifiants des groupes existants est utilisé. Les valeurs comprises entre 0 et 999 sont généralement réservées aux comptes système.

−h, −−help

Afficher un message d´aide et quitter.

−K, −−key CLÃ=VALEUR

Surcharger les valeurs par défaut du fichier /etc/login.defs (GID_MIN, GID_MAX et autres). L´option −K peut être indiquée plusieurs fois.

Exemple : −K GID_MIN=10 −K GID_MAX=499

Note : −K GID_MIN=10,GID_MAX=499 ne fonctionne pas pour l´instant.

−o, −−non−unique

This option permits to add a group with a non−unique GID.

−p, −−password MOT_DE_PASSE

The encrypted password, as returned by crypt(3). The default is to disable the password.

−r, −−system

Create a system group.

The numeric identifiers of new system groups are choosen in the SYS_GID_MINSYS_GID_MAX range, defined in login.defs, instead of GID_MINGID_MAX.

CONFIGURATION

The following configuration variables in /etc/login.defs change the behavior of this tool:

GID_MAX (number), GID_MIN (number)

Range of group IDs used for the creation of regular groups by useradd, useradd, or newusers.

MAX_MEMBERS_PER_GROUP (number)

Maximum members per group entry. When the maximum is reached, a new group entry (line) is started in /etc/group (with the same name, same password, and same GID).

The default value is 0, meaning that there are no limits in the number of members in a group.

This feature (split group) permits to limit the length of lines in the group file. This is useful to make sure that lines for NIS groups are not larger than 1024 characters.

If you need to enforce such limit, you can use 25.

Note: split groups may not be supported by all tools (even in the Shadow toolsuite. You should not use this variable unless you really need it.

SYS_GID_MAX (number), SYS_GID_MIN (number)

Range of group IDs used for the creation of system groups by useradd, groupadd, or newusers.

FICHIERS

/etc/group

Informations sur les groupes.

/etc/gshadow

Informations sécurisées sur les groupes.

/etc/login.defs

Configuration de la suite des mots de passe cachés « shadow password ».

AVERTISSEMENTS

It is usually recommended to only use usernames that begin with a lower case letter or an underscore, and are only followed by lower case letters, digits, underscores, dashes, and optionally terminated by a dollar sign. In regular expression terms: [a−z_][a−z0−9_−]*[$]?

On Debian, the only constraints are that usernames must neither start with a dash (´−´) nor contain a colon (´:´) or a whitespace (space:´ ´, end of line: ´\n´, tabulation: ´\t´, etc.).

Groupnames may only be up to 32 characters long.

You may not add a NIS or LDAP group. This must be performed on the corresponding server.

If the groupname already exists in an external group database such as NIS or LDAP, groupadd will deny the group creation request.

VALEURS DE RETOUR

La commande groupadd retourne les valeurs suivantes en quittant :

0

succès

2

erreur de syntaxe

3

paramètre non valable pour l´option

4

GID déjà utilisé (et −o n´est pas utilisé)

9

nom de groupe déjà utilisé

10

impossible de mettre à jour le fichier des groupes

VOIR AUSSI

chfn(1), chsh(1), passwd(1), gpasswd(8), groupdel(8), groupmod(8), login.defs(5), useradd(8), userdel(8), usermod(8).


groupadd(8)