System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Determine the last password changed for a user on non-trusted systems

Amitav
Frequent Advisor

Determine the last password changed for a user on non-trusted systems

Hi Gurus,
I need to know how can i determine the last password been changed for a user on hp-ux non trusted system. Though i've used the following commands, but didn't get the desired result:

logins -ax -l root
root 0 sys 3
/ts/root
/sbin/sh
PS 000000 -1 -1 -1
-1 000000


passwd -s
root PS

N.B.: Here i need to know the last password been changed for ROOT, though the above commands shud show me the date when it was changed, but nothing is shown. Kindly help me out on this case ASAP...!!

Cheers,
Amitav
5 REPLIES
James R. Ferguson
Acclaimed Contributor

Re: Determine the last password changed for a user on non-trusted systems

Hi:

A bit more information would be useful. What operating system version are you running? Is your '/etc/passwd' file a legacy one or is it a shadow implementation? What does the 'root' line in '/etc/passwd' look like?

Regards!

...JRF...
Amitav
Frequent Advisor

Re: Determine the last password changed for a user on non-trusted systems

Hi James,
The OS version is 11.11. No we do not have the /etc/shadow implementation. Below the few lines from /etc/passwd:

root:lxrrf6so5QX2o:0:3::/ts/root:/sbin/sh
daemon:*:1:5::/:/sbin/sh
bin:*:2:2::/usr/bin:/sbin/sh
sys:*:3:3::/:
Johnson Punniyalingam
Honored Contributor

Re: Determine the last password changed for a user on non-trusted systems

# passwd -sa
to show info for all users. It will show the date the passwd was last changed. 'man passwd' for more info
Problems are common to all, but attitude makes the difference
Bill Hassell
Honored Contributor

Re: Determine the last password changed for a user on non-trusted systems

You have a standard password so nothing is logged when the password is changed. That's why you see nothing with the passwd -s command. You need either Trusted, enhanced security or shadow password (depending on the version of HP-UX you are running).


Bill Hassell, sysadmin
Dennis Handly
Acclaimed Contributor

Re: Determine the last password changed for a user on non-trusted systems

>root:lxrrf6so5QX2o:0:3::/ts/root:/sbin/sh

You don't have password aging so you can't tell when it was changed.

>Bill: You have a standard password so nothing is logged when the password is changed.

If you have password aging with standard password, you can tell to the Wednesday when it was reset.