353 lines
8.4 KiB
HTML
353 lines
8.4 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of GROUPADD</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>GROUPADD</H1>
|
|
Section: Commandes de gestion du systèm (8)<BR>Updated: 28/05/2020<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NOM</H2>
|
|
|
|
groupadd - Créer un nouveau groupe
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="1">
|
|
<B>groupadd</B> [<I>options</I>] <I>groupe</I>
|
|
</DL>
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<P>
|
|
|
|
<DD>The
|
|
<B>groupadd</B>
|
|
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.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
<P>
|
|
|
|
The options which apply to the
|
|
<B>groupadd</B>
|
|
command are:
|
|
<P>
|
|
|
|
<B>-f</B>, <B>--force</B>
|
|
<DL COMPACT><DT id="2"><DD>
|
|
This option causes the command to simply exit with success status if the specified group already exists. When used with
|
|
<B>-g</B>, and the specified GID already exists, another (unique) GID is chosen (i.e.
|
|
<B>-g</B>
|
|
is turned off).
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-g</B>, <B>--gid</B> <I>GID</I>
|
|
<DL COMPACT><DT id="3"><DD>
|
|
The numerical value of the group's ID. This value must be unique, unless the
|
|
<B>-o</B>
|
|
option is used. The value must be non-negative. The default is to use the smallest ID value greater than or equal to
|
|
<B>GID_MIN</B>
|
|
and greater than every other group.
|
|
<P>
|
|
See also the
|
|
<B>-r</B>
|
|
option and the
|
|
<B>GID_MAX</B>
|
|
description.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-h</B>, <B>--help</B>
|
|
<DL COMPACT><DT id="4"><DD>
|
|
Afficher un message d'aide et quitter.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-K</B>, <B>--key</B> <I>KEY</I>=<I>VALUE</I>
|
|
<DL COMPACT><DT id="5"><DD>
|
|
Overrides
|
|
/etc/login.defs
|
|
defaults (GID_MIN, GID_MAX and others). Multiple
|
|
<B>-K</B>
|
|
options can be specified.
|
|
<P>
|
|
Example:
|
|
<B>-K</B> <I>GID_MIN</I>=<I>100</I>
|
|
<B>-K</B> <I>GID_MAX</I>=<I>499</I>
|
|
<P>
|
|
Note:
|
|
<B>-K</B> <I>GID_MIN</I>=<I>10</I>,<I>GID_MAX</I>=<I>499</I>
|
|
doesn't work yet.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-o</B>, <B>--non-unique</B>
|
|
<DL COMPACT><DT id="6"><DD>
|
|
Cette option permet d'ajouter un groupe avec un identifiant (« GID ») déjà utilisé.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-p</B>, <B>--password</B> <I>PASSWORD</I>
|
|
<DL COMPACT><DT id="7"><DD>
|
|
The encrypted password, as returned by
|
|
<B><A HREF="/cgi-bin/man/man2html?3+crypt">crypt</A></B>(3). The default is to disable the password.
|
|
<P>
|
|
<B>Note:</B>
|
|
This option is not recommended because the password (or encrypted password) will be visible by users listing the processes.
|
|
<P>
|
|
Il est nécessaire de vérifier si le mot de passe respecte la politique de mots de passe du système.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-r</B>, <B>--system</B>
|
|
<DL COMPACT><DT id="8"><DD>
|
|
Créer un groupe système.
|
|
<P>
|
|
The numeric identifiers of new system groups are chosen in the
|
|
<B>SYS_GID_MIN</B>-<B>SYS_GID_MAX</B>
|
|
range, defined in
|
|
login.defs, instead of
|
|
<B>GID_MIN</B>-<B>GID_MAX</B>.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-R</B>, <B>--root</B> <I>CHROOT_DIR</I>
|
|
<DL COMPACT><DT id="9"><DD>
|
|
Apply changes in the
|
|
<I>CHROOT_DIR</I>
|
|
directory and use the configuration files from the
|
|
<I>CHROOT_DIR</I>
|
|
directory.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-P</B>, <B>--prefix</B> <I>PREFIX_DIR</I>
|
|
<DL COMPACT><DT id="10"><DD>
|
|
Apply changes in the
|
|
<I>PREFIX_DIR</I>
|
|
directory and use the configuration files from the
|
|
<I>PREFIX_DIR</I>
|
|
directory. This option does not chroot and is intended for preparing a cross-compilation target. Some limitations: NIS and LDAP users/groups are not verified. PAM authentication is using the host files. No SELINUX support.
|
|
</DL>
|
|
|
|
<A NAME="lbAF"> </A>
|
|
<H2>CONFIGURATION</H2>
|
|
|
|
<P>
|
|
|
|
The following configuration variables in
|
|
/etc/login.defs
|
|
change the behavior of this tool:
|
|
<P>
|
|
|
|
<B>GID_MAX</B> (number), <B>GID_MIN</B> (number)
|
|
<DL COMPACT><DT id="11"><DD>
|
|
Range of group IDs used for the creation of regular groups by
|
|
<B>useradd</B>,
|
|
<B>groupadd</B>, or
|
|
<B>newusers</B>.
|
|
<P>
|
|
The default value for
|
|
<B>GID_MIN</B>
|
|
(resp.
|
|
<B>GID_MAX</B>) is 1000 (resp. 60000).
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>MAX_MEMBERS_PER_GROUP</B> (number)
|
|
<DL COMPACT><DT id="12"><DD>
|
|
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).
|
|
<P>
|
|
La valeur par défaut est 0, ce qui signifie qu'il n'y a pas de limites pour le nombre de membres dans un groupe.
|
|
<P>
|
|
Cette fonctionnalité (groupe découpé) permet de limiter la longueur des lignes dans le fichier de groupes. Ceci est utile pour s'assurer que les lignes pour les groupes NIS ne sont pas plus grandes que 1024 caractères.
|
|
<P>
|
|
Si vous avez besoin de configurer cette limite, vous pouvez utiliser 25.
|
|
<P>
|
|
Remarque : les groupes découpés ne sont peut-être pas pris en charge par tous les outils (même dans la suite d'outils Shadow). Vous ne devriez pas utiliser cette variable, sauf si vous en avez vraiment besoin.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>SYS_GID_MAX</B> (number), <B>SYS_GID_MIN</B> (number)
|
|
<DL COMPACT><DT id="13"><DD>
|
|
Range of group IDs used for the creation of system groups by
|
|
<B>useradd</B>,
|
|
<B>groupadd</B>, or
|
|
<B>newusers</B>.
|
|
<P>
|
|
The default value for
|
|
<B>SYS_GID_MIN</B>
|
|
(resp.
|
|
<B>SYS_GID_MAX</B>) is 101 (resp.
|
|
<B>GID_MIN</B>-1).
|
|
</DL>
|
|
|
|
<A NAME="lbAG"> </A>
|
|
<H2>FICHIERS</H2>
|
|
|
|
<P>
|
|
|
|
/etc/group
|
|
<DL COMPACT><DT id="14"><DD>
|
|
Informations sur les groupes.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
/etc/gshadow
|
|
<DL COMPACT><DT id="15"><DD>
|
|
Informations sécurisées sur les groupes.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
/etc/login.defs
|
|
<DL COMPACT><DT id="16"><DD>
|
|
Configuration de la suite des mots de passe cachés « shadow password ».
|
|
</DL>
|
|
|
|
<A NAME="lbAH"> </A>
|
|
<H2>AVERTISSEMENTS</H2>
|
|
|
|
<P>
|
|
|
|
It is usually recommended to only use groupnames that begin with a lower case letter or an underscore, followed by lower case letters, digits, underscores, or dashes. They can end with a dollar sign. In regular expression terms: [a-z_][a-z0-9_-]*[$]?
|
|
<P>
|
|
|
|
On Debian, the only constraints are that groupnames must neither start with a dash ('-') nor plus ('+') nor tilde ('~') nor contain a colon (':'), a comma (','), or a whitespace (space:' ', end of line: '\n', tabulation: '\t', etc.).
|
|
<P>
|
|
|
|
Groupnames may only be up to 32 characters long.
|
|
<P>
|
|
|
|
Vous ne pouvez pas ajouter d'utilisateur à un groupe NIS ou LDAP. Cela doit être effectué sur le serveur correspondant.
|
|
<P>
|
|
|
|
If the groupname already exists in an external group database such as NIS or LDAP,
|
|
<B>groupadd</B>
|
|
will deny the group creation request.
|
|
<A NAME="lbAI"> </A>
|
|
<H2>VALEURS DE RETOUR</H2>
|
|
|
|
<P>
|
|
|
|
The
|
|
<B>groupadd</B>
|
|
command exits with the following values:
|
|
<P>
|
|
|
|
<I>0</I>
|
|
<DL COMPACT><DT id="17"><DD>
|
|
success
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<I>2</I>
|
|
<DL COMPACT><DT id="18"><DD>
|
|
invalid command syntax
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<I>3</I>
|
|
<DL COMPACT><DT id="19"><DD>
|
|
invalid argument to option
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<I>4</I>
|
|
<DL COMPACT><DT id="20"><DD>
|
|
GID not unique (when
|
|
<B>-o</B>
|
|
not used)
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<I>9</I>
|
|
<DL COMPACT><DT id="21"><DD>
|
|
group name not unique
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<I>10</I>
|
|
<DL COMPACT><DT id="22"><DD>
|
|
can't update group file
|
|
</DL>
|
|
|
|
<A NAME="lbAJ"> </A>
|
|
<H2>VOIR AUSSI</H2>
|
|
|
|
<P>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+chfn">chfn</A></B>(1),
|
|
<B><A HREF="/cgi-bin/man/man2html?1+chsh">chsh</A></B>(1),
|
|
<B><A HREF="/cgi-bin/man/man2html?1+passwd">passwd</A></B>(1),
|
|
<B><A HREF="/cgi-bin/man/man2html?8+gpasswd">gpasswd</A></B>(8),
|
|
<B><A HREF="/cgi-bin/man/man2html?8+groupdel">groupdel</A></B>(8),
|
|
<B><A HREF="/cgi-bin/man/man2html?8+groupmod">groupmod</A></B>(8),
|
|
<B><A HREF="/cgi-bin/man/man2html?5+login.defs">login.defs</A></B>(5),
|
|
<B><A HREF="/cgi-bin/man/man2html?8+useradd">useradd</A></B>(8),
|
|
<B><A HREF="/cgi-bin/man/man2html?8+userdel">userdel</A></B>(8),
|
|
<B><A HREF="/cgi-bin/man/man2html?8+usermod">usermod</A></B>(8).
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="23"><A HREF="#lbAB">NOM</A><DD>
|
|
<DT id="24"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="25"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="26"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DT id="27"><A HREF="#lbAF">CONFIGURATION</A><DD>
|
|
<DT id="28"><A HREF="#lbAG">FICHIERS</A><DD>
|
|
<DT id="29"><A HREF="#lbAH">AVERTISSEMENTS</A><DD>
|
|
<DT id="30"><A HREF="#lbAI">VALEURS DE RETOUR</A><DD>
|
|
<DT id="31"><A HREF="#lbAJ">VOIR AUSSI</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:03 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|