Monday, March 2, 2015

Check when your password will expire

I hate to even admit it, but there are still some places where my password is managed locally.  (Ugh.  Maybe I should have put a trigger warning on this post.)  Anyway, this means that it's occasionally useful to know when I last changed my password and/or when I will need to do it again.

It turns out that chage, which I had thought was really only useful for root, provides a way for non-root users to check their own accounts.

somesrvr kexline@somesrvr ~
$chage -l kexline
Last password change     : Mar 02, 2015
Password expires     : Mar 06, 2015
Password inactive     : never
Account expires     : never
Minimum number of days between password change     : 0
Maximum number of days between password change     : 4
Number of days of warning before password expires   : 2