-   Solaris / OpenSolaris (
-   -   command to findout password expiry date (

manoj.linux 02-04-2013 04:22 AM

command to findout password expiry date

I would like to know is there command which will tell me when password will be expire and when last password was changed ?

like on linux chage -l <username?

shivaa 02-04-2013 05:13 AM

It can be checked in /etc/shadow file in it's 8th field.

~$ grep 'username' /etc/shadow
~$ awk -F":" '/username/ {print $8}' /etc/shadow

It contains the date when the user account expires once exceeded.

As per manual of shadow:


An absolute date expressed as the number of
days since the Unix Epoch (January 1, 1970).
When this number is reached the login can no
longer be used. For example, an expire value
of 13514 specified a login expiration of
January 1, 2007.

Also once go through manuals for more clear understanding:

~$ man passwd
~$ man shadow

All times are GMT -5. The time now is 11:11 PM.