chage
AccountsPackage: passwd
Reads and changes a password's lifetime and an account's expiry date. chage -l answers "is this account about to expire?", a question behind a fair number of logins refused on a Monday morning.
What its options do in the lessons
From the same glossary the lessons render under their commands, so the two cannot disagree.
chage -l- Lists the account's aging information: last change, password expiry, account expiry, and the three periods. This is the reader that answers for the account, where
passwd -Sanswers for the password. chage -E- Sets the account expiry date, as
YYYY-MM-DDor in days since 1 January 1970.-1removes the expiry; past that date PAM refuses to open a session, whatever the authentication method. chage -d- Sets the date of the last password change.
-d 0puts it at zero, which forces the person to choose a new password at their next login.
