![]() |
chage(1) |
![]() |
chage − cambia le informazioni sulla scadenza della password
chage [opzioni] [LOGIN] |
chage modifica il numero minimo di giorni tra i cambi di password e la data dell'ultimo cambio. Queste informazioni sono usate dal sistema per determinare quando un utente deve cambiare la propria password.
Il comando chage accetta le seguenti opzioni:
−d, −−lastday LAST_DAY
Imposta la data dell'ultimo cambio della password, espressa come il numero di giorni trascorsi dal 1 gennaio 1970. La data può anche essere specificata nel formato AAAA−MM−GG o nella notazione comunemente usata nel proprio paese.
−E, −−expiredate EXPIRE_DATE
Set the date or number of days since January 1, 1970 on which the user's account will no longer be accessible. The date may also be expressed in the format YYYY−MM−DD (or the format more commonly used in your area). A user whose account is locked must contact the system administrator before being able to use the system again.
Passing the number −1 as the EXPIRE_DATE will remove an account expiration date.
−h, −−help
Mostra un messaggio di aiuto ed esce.
−I, −−inactive INACTIVE
Set the number of days of inactivity after a password has expired before the account is locked. The INACTIVE option is the number of days of inactivity. A user whose account is locked must contact the system administrator before being able to use the system again.
Passing the number −1 as the INACTIVE will remove an account's inactivity.
−l, −−list
Show account aging information.
−m, −−mindays MIN_DAYS
Set the minimum number of days between password changes to MIN_DAYS. A value of zero for this field indicates that the user may change his/her password at any time.
−M, −−maxdays MAX_DAYS
Set the maximum number of days during which a password is valid. When MAX_DAYS plus LAST_DAY is less than the current day, the user will be required to change his/her password before being able to use his/her account. This occurrence can be planned for in advance by use of the −W option, which provides the user with advance warning.
Passing the number −1 as MAX_DAYS will remove checking a password's validity.
−W, −−warndays WARN_DAYS
Imposta il numero di giorni di preavviso prima che sia obbligatorio cambiare la password. L'opzione gg_avviso indica il numero di giorni prima della scadenza della password in cui l'utente viene avvertito dell'imminente scadenza.
If none of the options are selected, chage operates in an interactive fashion, prompting the user with the current values for all of the fields. Enter the new value to change the field, or leave the line blank to use the current value. The current value is displayed between a pair of [ ] marks.
chage richiede che il file delle shadow password sia disponibile.
L'uso del comando chage è permesso solo all'utente root, tranne per l'opzione −l, che può essere usata da un utente non privilegiato per conoscere la scadenza della propria password o dell'account.
The following configuration variables in /etc/login.defs change the behavior of this tool:
/etc/passwd
informazioni sugli account utente.
/etc/shadow
Informazioni sicure sugli account di utenti.
Il comando chage restituisce i seguenti valori:
0
successo
1
permission denied
2
sintassi del comando errata
15
can't find the shadow password file
passwd(5), shadow(5).
![]() |
chage(1) | ![]() |