ron@slackbox:~$ su norTo re-enable the account, I will use either of the following commands:
Password:
Your login has expired. Contact the system administrator.
usermod -e yyyy-mm-dd usernameWhen running the chage command, there's no message or prompt after execution. I'm able to log back in without issue.
chage -E yyyy-mm-dd username
Next, we'll learn how to set the number of days until a password change is required. We'll set the password to expire for 30 days:
ron@slackbox:~$ron@slackbox:~$ sudo chage -M 30 nor
ron@slackbox:~$
ron@slackbox:~$ sudo chage -l nor
Last password change : May 10, 2015
Password expires : Jun 09, 2015
Password inactive : never
Account expires : Dec 31, 2015
Minimum number of days between password change : 0
Maximum number of days between password change : 30
Number of days of warning before password expires : 7
ron@slackbox:~$
We'll check this account again after 30 days and use the 'password -u nor' command to re-enable the expired password at that time.
No comments:
Post a Comment