1.PASSWD command
[Email protected] skel]# passwd 325 for user rusky.passwd: Success Description:2016061733 days---3 day after the user can change the password 55 days----5 day after the password automatically expires 2is2 days before expiry ---the password expires within 2 day of prompting the user
2.chage-l command
Showing Password expiry information with chage-l
[[email protected] skel]# chage-l ruskylast Password change : June 17 , 2016 password Expires:jun 22 , 2016 -- password expiration Time password Inactive:neveraccount Expires:neverminimum number of days between password change: 3 maximum number of days between password change: 5 number of days of warning before password expires: 2
If the time is less than (Minimum number of days between password Change:3), the password change is not allowed.
[[email protected] ~]$ passwd changing password for user Rusky. Changing password Rusky. ( Current) UNIX password:you must wait longer to change your passwordpasswd:authentication token manipulation error[[email protected] ~]$ [[email protected] ~]$ su- RuskyPassword:Warning:your password would expire in 1 Day-- prompt password expires after 1 days last Login:mon June 20
22 : 16 : 31 EDT 2016 on Pts/0
passwd command to limit user password expiry time