These values can be set or modified from the command line by root, using the passwd command as follows;
# passwd -n 0 -w 14 -x 60 username
Where -n is the minimum number of days allowed between password changes, -w is the number of days befor the password expires and the user is warned, and -x is the maximum munber of days that the password will be valid for.
These values can ONLY be queried or changed by root.
When a user changes their password, only the encrypted password and current date are stored in /etc/shadow. The "number-of-days" values are not changed.
The expiration date, is calculated, not stored.
To remove the password expiration, symply type:
# passwd -x -1 username
Geen opmerkingen:
Een reactie posten