passwd expiry

any one can help me from where this command passwd -s root fetching from...? so that i can write the script for cheking root password expiry which are expiring before 2 days and sent a mail... Please give me the script if u have....! :b:

Solaris any version...

Passwords are held in the /etc/shadow, owned by root and permission 400.

Man -a password will give you the layout of the colon separated fields.

Note the number in the expiry field is the number of days since the 1st January 1970 (the epoch)

Also be aware output of date command depends on your LOCALE variable

Thank you so much for your reply...! :slight_smile: