Check when password expires

How do I check to see when a password expires on a user account with using the CLI?

passwd -s username

will tell you when the password was last changed and after how much days it will expires. You can also read these values in the /etc/shadow file.

1 Like