User password expiry check in Servers

User password expiry check in Servers

Authentication fails if the user's password has expired, even if the entered password is correct. Additionally, even when using public key authentication, authentication may fail if the server prompts the user to change their password during login.

Checking the password expiration

Linux
chage -l <username>

AIX
lsuser -a <username>

Sun Solaris
passwd -s <username>

Mac OS
dscl . -read /Users/<username> PasswordExpiration

FreeBSD
pw user show <username> | grep passwd

HP-UX
pwadm -q <username>