how to check the password expiry date of a user?
i want to check when is the password expiry date of a particular user, how can I do that in HP UX 11?
I don't need a script, i just want to check the status of some users occasionally.
If your system uses the /etc/shadow file, then that is where the information is contained, rather than /etc/passwd.
To read an record in many system files, you can use the "getent" command. However the shadow file is readable only by root.
There may also be a "chage" command. As root you can enter "chage -l <username>". If you are a regular user, a password may be necessary. If you have the chage command, then this would be the handiest way to get a readily human readable form of this information.
If neither of these work, you need to look into how user account information is stored. Do you use NIS or LDAP? Do you use PAM and pam_userdb.so? The /etc/nsswitch file may contain some useful pointers. For example, look at the "users:" line and the "shadow:" line.
|All times are GMT -5. The time now is 07:26 PM.|