man-pages/fr/man8/userdel.8.html
2021-03-31 01:06:50 +01:00

409 lines
9.9 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of USERDEL</TITLE>
</HEAD><BODY>
<H1>USERDEL</H1>
Section: Commandes de gestion du syst&egrave;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">&nbsp;</A>
<H2>NOM</H2>
userdel - supprimer un compte utilisateur et les fichiers associ&eacute;s
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<DL COMPACT>
<DT id="1">
<B>userdel</B> [options] <I>LOGIN</I>
</DL>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<P>
<B>userdel</B>
<DD>is a low level utility for removing users. On Debian, administrators should usually use
<B><A HREF="/cgi-bin/man/man2html?8+deluser">deluser</A></B>(8)
instead.
<P>
The
<B>userdel</B>
command modifies the system account files, deleting all entries that refer to the user name
<I>LOGIN</I>. The named user must exist.
<A NAME="lbAE">&nbsp;</A>
<H2>OPTIONS</H2>
<P>
The options which apply to the
<B>userdel</B>
command are:
<P>
<B>-f</B>, <B>--force</B>
<DL COMPACT><DT id="2"><DD>
This option forces the removal of the user account, even if the user is still logged in. It also forces
<B>userdel</B>
to remove the user's home directory and mail spool, even if another user uses the same home directory or if the mail spool is not owned by the specified user. If
<B>USERGROUPS_ENAB</B>
is defined to
<I>yes</I>
in
/etc/login.defs
and if a group exists with the same name as the deleted user, then this group will be removed, even if it is still the primary group of another user.
<P>
<I>Note:</I>
This option is dangerous and may leave your system in an inconsistent state.
</DL>
<P>
<B>-h</B>, <B>--help</B>
<DL COMPACT><DT id="3"><DD>
Afficher un message d'aide et quitter.
</DL>
<P>
<B>-r</B>, <B>--remove</B>
<DL COMPACT><DT id="4"><DD>
Les fichiers pr&eacute;sents dans le r&eacute;pertoire personnel de l'utilisateur seront supprim&eacute;s en m&ecirc;me temps que le r&eacute;pertoire lui-m&ecirc;me, ainsi que le r&eacute;pertoire d'attente des courriels. Vous devrez rechercher et &eacute;liminer vous-m&ecirc;me les fichiers situ&eacute;s dans d'autres syst&egrave;mes de fichiers.
<P>
The mail spool is defined by the
<B>MAIL_DIR</B>
variable in the
login.defs
file.
</DL>
<P>
<B>-R</B>, <B>--root</B>&nbsp;<I>CHROOT_DIR</I>
<DL COMPACT><DT id="5"><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>&nbsp;<I>PREFIX_DIR</I>
<DL COMPACT><DT id="6"><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>
<P>
<B>-Z</B>, <B>--selinux-user</B>
<DL COMPACT><DT id="7"><DD>
&Eacute;limine toute association avec tout utilisateur SELinux pour la connexion de l'utilisateur.
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>CONFIGURATION</H2>
<P>
The following configuration variables in
/etc/login.defs
change the behavior of this tool:
<P>
<B>MAIL_DIR</B> (string)
<DL COMPACT><DT id="8"><DD>
R&eacute;pertoire d'attente des courriels (&laquo;&nbsp;mail spool directory&nbsp;&raquo;). Ce param&egrave;tre est n&eacute;cessaire pour manipuler les bo&icirc;tes &agrave; lettres lorsque le compte d'un utilisateur est modifi&eacute; ou supprim&eacute;. S'il n'est pas sp&eacute;cifi&eacute;, une valeur par d&eacute;faut d&eacute;finie &agrave; la compilation est utilis&eacute;e.
</DL>
<P>
<B>MAIL_FILE</B> (string)
<DL COMPACT><DT id="9"><DD>
D&eacute;finir l'emplacement des bo&icirc;tes aux lettres des utilisateurs relativement &agrave; leur r&eacute;pertoire personnel.
</DL>
<P>
The
<B>MAIL_DIR</B>
and
<B>MAIL_FILE</B>
variables are used by
<B>useradd</B>,
<B>usermod</B>, and
<B>userdel</B>
to create, move, or delete the user's mail spool.
<P>
<B>MAX_MEMBERS_PER_GROUP</B> (number)
<DL COMPACT><DT id="10"><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&eacute;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&eacute; (groupe d&eacute;coup&eacute;) 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&egrave;res.
<P>
Si vous avez besoin de configurer cette limite, vous pouvez utiliser 25.
<P>
Remarque&nbsp;: les groupes d&eacute;coup&eacute;s ne sont peut-&ecirc;tre pas pris en charge par tous les outils (m&ecirc;me dans la suite d'outils Shadow). Vous ne devriez pas utiliser cette variable, sauf si vous en avez vraiment besoin.
</DL>
<P>
<B>USERDEL_CMD</B> (string)
<DL COMPACT><DT id="11"><DD>
Si d&eacute;finie, la commande est ex&eacute;cut&eacute;e lors de la suppression d'un utilisateur. Elle pourra supprimer toutes les t&acirc;ches p&eacute;riodiques cron ou at, tous les travaux d'impression, etc. de l'utilisateur (qui sera fourni comme premier param&egrave;tre).
<P>
Le code de retour du script n'est pas pris en compte.
<P>
Here is an example script, which removes the user's cron, at and print jobs:
<P>
<DL COMPACT><DT id="12"><DD>
<PRE>
#! /bin/sh
# Check for the required argument.
if [ $# != 1 ]; then
echo &quot;Usage: $0 username&quot;
exit 1
fi
# Remove cron jobs.
crontab -r -u $1
# Remove at jobs.
# Note that it will remove any jobs owned by the same UID,
# even if it was shared by a different username.
AT_SPOOL_DIR=/var/spool/cron/atjobs
find $AT_SPOOL_DIR -name &quot;[^.]*&quot; -type f -user $1 -delete \;
# Remove print jobs.
lprm $1
# All done.
exit 0
</PRE>
</DL>
<P>
</DL>
<P>
<B>USERGROUPS_ENAB</B> (boolean)
<DL COMPACT><DT id="13"><DD>
If set to
<I>yes</I>,
<B>userdel</B>
will remove the user's group if it contains no more members, and
<B>useradd</B>
will create by default a group with the name of the user.
</DL>
<A NAME="lbAG">&nbsp;</A>
<H2>FICHIERS</H2>
<P>
/etc/group
<DL COMPACT><DT id="14"><DD>
Informations sur les groupes.
</DL>
<P>
/etc/login.defs
<DL COMPACT><DT id="15"><DD>
Configuration de la suite des mots de passe cach&eacute;s &laquo;&nbsp;shadow password&nbsp;&raquo;.
</DL>
<P>
/etc/passwd
<DL COMPACT><DT id="16"><DD>
Informations sur les comptes des utilisateurs.
</DL>
<P>
/etc/shadow
<DL COMPACT><DT id="17"><DD>
Informations s&eacute;curis&eacute;es sur les comptes utilisateurs.
</DL>
<P>
/etc/subgid
<DL COMPACT><DT id="18"><DD>
IDs des groupes subalternes d'un utilisateur.
</DL>
<P>
/etc/subuid
<DL COMPACT><DT id="19"><DD>
IDs de utilisateurs subalternes d'un utilisateur.
</DL>
<A NAME="lbAH">&nbsp;</A>
<H2>VALEURS DE RETOUR</H2>
<P>
The
<B>userdel</B>
command exits with the following values:
<P>
<I>0</I>
<DL COMPACT><DT id="20"><DD>
success
</DL>
<P>
<I>1</I>
<DL COMPACT><DT id="21"><DD>
can't update password file
</DL>
<P>
<I>2</I>
<DL COMPACT><DT id="22"><DD>
invalid command syntax
</DL>
<P>
<I>6</I>
<DL COMPACT><DT id="23"><DD>
specified user doesn't exist
</DL>
<P>
<I>8</I>
<DL COMPACT><DT id="24"><DD>
user currently logged in
</DL>
<P>
<I>10</I>
<DL COMPACT><DT id="25"><DD>
can't update group file
</DL>
<P>
<I>12</I>
<DL COMPACT><DT id="26"><DD>
can't remove home directory
</DL>
<A NAME="lbAI">&nbsp;</A>
<H2>AVERTISSEMENTS</H2>
<P>
<B>userdel</B>
will not allow you to remove an account if there are running processes which belong to this account. In that case, you may have to kill those processes or lock the user's password or account and remove the account later. The
<B>-f</B>
option can force the deletion of this account.
<P>
Vous devez v&eacute;rifier vous-m&ecirc;me qu'aucun fichier poss&eacute;d&eacute; par l'utilisateur ne subsiste sur tous les syst&egrave;mes de fichiers.
<P>
Vous ne pouvez supprimer aucun attribut NIS d'un client NIS. Cela doit &ecirc;tre effectu&eacute; sur le serveur NIS.
<P>
If
<B>USERGROUPS_ENAB</B>
is defined to
<I>yes</I>
in
/etc/login.defs,
<B>userdel</B>
will delete the group with the same name as the user. To avoid inconsistencies in the passwd and group databases,
<B>userdel</B>
will check that this group is not used as a primary group for another user, and will just warn without deleting the group otherwise. The
<B>-f</B>
option can force the deletion of this group.
<A NAME="lbAJ">&nbsp;</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?5+login.defs">login.defs</A></B>(5),
<B><A HREF="/cgi-bin/man/man2html?8+gpasswd">gpasswd</A></B>(8),
<B><A HREF="/cgi-bin/man/man2html?8+groupadd">groupadd</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+subgid">subgid</A></B>(5), <B><A HREF="/cgi-bin/man/man2html?5+subuid">subuid</A></B>(5),
<B><A HREF="/cgi-bin/man/man2html?8+useradd">useradd</A></B>(8),
<B><A HREF="/cgi-bin/man/man2html?8+usermod">usermod</A></B>(8).
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="27"><A HREF="#lbAB">NOM</A><DD>
<DT id="28"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="29"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="30"><A HREF="#lbAE">OPTIONS</A><DD>
<DT id="31"><A HREF="#lbAF">CONFIGURATION</A><DD>
<DT id="32"><A HREF="#lbAG">FICHIERS</A><DD>
<DT id="33"><A HREF="#lbAH">VALEURS DE RETOUR</A><DD>
<DT id="34"><A HREF="#lbAI">AVERTISSEMENTS</A><DD>
<DT id="35"><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>