253 lines
6.0 KiB
HTML
253 lines
6.0 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of CHPASSWD</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>CHPASSWD</H1>
|
|
Section: Comandi per la gestione del si (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>NOME</H2>
|
|
|
|
chpasswd - aggiorna le password in modo non interattivo
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SINOSSI</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="1">
|
|
<B>chpasswd</B> [<I>opzioni</I>]
|
|
</DL>
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIZIONE</H2>
|
|
|
|
<P>
|
|
|
|
<DD>The
|
|
<B>chpasswd</B>
|
|
command reads a list of user name and password pairs from standard input and uses this information to update a group of existing users. Each line is of the format:
|
|
<P>
|
|
|
|
<I>user_name</I>:<I>password</I>
|
|
<P>
|
|
|
|
By default the passwords must be supplied in clear-text, and are encrypted by
|
|
<B>chpasswd</B>. Also the password age will be updated, if present.
|
|
<P>
|
|
|
|
By default, passwords are encrypted by PAM, but (even if not recommended) you can select a different encryption method with the
|
|
<B>-e</B>,
|
|
<B>-m</B>, or
|
|
<B>-c</B>
|
|
options.
|
|
<P>
|
|
|
|
Except when PAM is used to encrypt the passwords,
|
|
<B>chpasswd</B>
|
|
first updates all the passwords in memory, and then commits all the changes to disk if no errors occurred for any user.
|
|
<P>
|
|
|
|
When PAM is used to encrypt the passwords (and update the passwords in the system database) then if a password cannot be updated
|
|
<B>chpasswd</B>
|
|
continues updating the passwords of the next users, and will return an error code on exit.
|
|
<P>
|
|
|
|
Questo comando è appositamente pensato per grossi sistemi in cui si abbia la necessità di creare molti account nello stesso momento.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPZIONI</H2>
|
|
|
|
<P>
|
|
|
|
The options which apply to the
|
|
<B>chpasswd</B>
|
|
command are:
|
|
<P>
|
|
|
|
<B>-c</B>, <B>--crypt-method</B> <I>METHOD</I>
|
|
<DL COMPACT><DT id="2"><DD>
|
|
Utilizza il metodo specificato per cifrare le password.
|
|
<P>
|
|
I metodi disponibili sono DES, MD5, NONE e SHA256 o SHA512 se la propria libc lo consente.
|
|
<P>
|
|
PAM viene utilizzato, in maniera predefinita, per cifrare le password.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-e</B>, <B>--encrypted</B>
|
|
<DL COMPACT><DT id="3"><DD>
|
|
Le password fornite sono in forma cifrata.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-h</B>, <B>--help</B>
|
|
<DL COMPACT><DT id="4"><DD>
|
|
Mostra un messaggio di aiuto ed esce.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-m</B>, <B>--md5</B>
|
|
<DL COMPACT><DT id="5"><DD>
|
|
Usa la cifratura MD5 anziché DES quando le password fornite non sono cifrate.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-R</B>, <B>--root</B> <I>CHROOT_DIR</I>
|
|
<DL COMPACT><DT id="6"><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>-s</B>, <B>--sha-rounds</B> <I>ROUNDS</I>
|
|
<DL COMPACT><DT id="7"><DD>
|
|
Usa il numero specificato di cicli per cifrare la password.
|
|
<P>
|
|
Il valore 0 indica che il sistema utilizzerà il numero predefinito di cicli per il metodo crypt (5000).
|
|
<P>
|
|
I valori minimo di 1.000 e massimo di 999.999.999 sono forzati.
|
|
<P>
|
|
Si può utilizzare questa opzione solo con i metodi di cifratura SHA256 o SHA512.
|
|
<P>
|
|
By default, the number of rounds is defined by the
|
|
<B>SHA_CRYPT_MIN_ROUNDS</B>
|
|
and
|
|
<B>SHA_CRYPT_MAX_ROUNDS</B>
|
|
variables in
|
|
/etc/login.defs.
|
|
</DL>
|
|
|
|
<A NAME="lbAF"> </A>
|
|
<H2>AVVISI/CAVEAT</H2>
|
|
|
|
<P>
|
|
|
|
Ricordarsi di impostare i permessi o umask in modo da prevenire la lettura in chiaro da parte di altri utenti.
|
|
<A NAME="lbAG"> </A>
|
|
<H2>CONFIGURAZIONE</H2>
|
|
|
|
<P>
|
|
|
|
The following configuration variables in
|
|
/etc/login.defs
|
|
change the behavior of this tool:
|
|
<P>
|
|
|
|
<B>SHA_CRYPT_MIN_ROUNDS</B> (number), <B>SHA_CRYPT_MAX_ROUNDS</B> (number)
|
|
<DL COMPACT><DT id="8"><DD>
|
|
When
|
|
<B>ENCRYPT_METHOD</B>
|
|
is set to
|
|
<I>SHA256</I>
|
|
or
|
|
<I>SHA512</I>, this defines the number of SHA rounds used by the encryption algorithm by default (when the number of rounds is not specified on the command line).
|
|
<P>
|
|
Con molti cicli è più difficile trovare una password usando la forza bruta. Ma va notato che è richiesta maggiore potenza di calcolo per autenticare gli utenti.
|
|
<P>
|
|
Se non specificato sarà la libc a scegliere il numero di cicli (5000).
|
|
<P>
|
|
Il valore deve essere compreso tra 1.000 e 999.999.999.
|
|
<P>
|
|
If only one of the
|
|
<B>SHA_CRYPT_MIN_ROUNDS</B>
|
|
or
|
|
<B>SHA_CRYPT_MAX_ROUNDS</B>
|
|
values is set, then this value will be used.
|
|
<P>
|
|
If
|
|
<B>SHA_CRYPT_MIN_ROUNDS</B>
|
|
>
|
|
<B>SHA_CRYPT_MAX_ROUNDS</B>, the highest value will be used.
|
|
<P>
|
|
Nota: questo ha effetto solo sulla generazione delle password di gruppo. La generazione delle password utente avviene tramite PAM ed è soggetta alla configurazione PAM. È raccomandato di impostare questa variabile in maniera consistente con la configurazione PAM.
|
|
</DL>
|
|
|
|
<A NAME="lbAH"> </A>
|
|
<H2>FILE</H2>
|
|
|
|
<P>
|
|
|
|
/etc/passwd
|
|
<DL COMPACT><DT id="9"><DD>
|
|
Informazioni sugli account utente.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
/etc/shadow
|
|
<DL COMPACT><DT id="10"><DD>
|
|
Informazioni sicure sugli account utente.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
/etc/login.defs
|
|
<DL COMPACT><DT id="11"><DD>
|
|
Configurazione del pacchetto password shadow
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
/etc/pam.d/chpasswd
|
|
<DL COMPACT><DT id="12"><DD>
|
|
PAM configuration for
|
|
<B>chpasswd</B>.
|
|
</DL>
|
|
|
|
<A NAME="lbAI"> </A>
|
|
<H2>VEDERE ANCHE</H2>
|
|
|
|
<P>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+passwd">passwd</A></B>(1),
|
|
<B><A HREF="/cgi-bin/man/man2html?8+newusers">newusers</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).
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="13"><A HREF="#lbAB">NOME</A><DD>
|
|
<DT id="14"><A HREF="#lbAC">SINOSSI</A><DD>
|
|
<DT id="15"><A HREF="#lbAD">DESCRIZIONE</A><DD>
|
|
<DT id="16"><A HREF="#lbAE">OPZIONI</A><DD>
|
|
<DT id="17"><A HREF="#lbAF">AVVISI/CAVEAT</A><DD>
|
|
<DT id="18"><A HREF="#lbAG">CONFIGURAZIONE</A><DD>
|
|
<DT id="19"><A HREF="#lbAH">FILE</A><DD>
|
|
<DT id="20"><A HREF="#lbAI">VEDERE ANCHE</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:04 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|