1833068 Members
3003 Online
110049 Solutions
New Discussion

Password ageing

 
SOLVED
Go to solution
woodman
Occasional Contributor

Password ageing

Hi all

Can you please help me to find the password ageing for all the users in HP UX .
Example in Solaris we use the /etc/shadow file to check the ageing of user account.

Thanks
Woodman
4 REPLIES 4
OldSchool
Honored Contributor
Solution

Re: Password ageing

for non-trusted systems:

passwd -s -a

will return something like

l00s7m PS 01/31/08 14 56


which indicates passwd set (PS) on 01/31/08, can't change it in less than 14 days, and must change it by 56 days.
"man passwd" for more info

for trusted systems:
man getprpw, modprw, modprdef and getprdef for more
James R. Ferguson
Acclaimed Contributor

Re: Password ageing

Hi:

Look at the 'logins' command; specifically the '-x' switch output:

http://docs.hp.com/en/B3921-60631/logins.1M.html

Regards!

...JRF...
Bill Hassell
Honored Contributor

Re: Password ageing

There are several setups for security in HP-UX including a shadow passwd file. Your system may be standard, Trusted, shadow, or for new systems, the enhanced security option.

So use the passwd -s command to see the current aging:

passwd -s billh
billh PS 03/03/08 21 35 7

where 21=days before change is allowed, 35=days until expiration, 7=days when warnings start.

From the passwd man page:

The format of the display will be:

name status mm/dd/yy min max warn

or, if password aging information is not present:

name status

where status means: PS =passworded; LK =locked; and NP=no password.

This works for all types of security methods. To get a list of all users:

for MYID in $(cut -f1 -d: /etc/passwd)
do
passwd -s $MYID
done


Bill Hassell, sysadmin
woodman
Occasional Contributor

Re: Password ageing

Thanks all for the help.