Operating System - HP-UX
1830177 Members
2464 Online
109999 Solutions
New Discussion

How to get Password Last changed for a user on Hpux Non-Trusted machine

 
Basi Reddy
Occasional Contributor

How to get Password Last changed for a user on Hpux Non-Trusted machine

How to get the password last changed value for an user from a Non trusted hpux machine.

Looked at some forums to get the answers, but non of them gave the required answer.

Is there any C/C++ API or a command to get the exact password last change date (day, month, year and time)

Os version: Hpux B.11.11

4 REPLIES 4
Rita C Workman
Honored Contributor

Re: How to get Password Last changed for a user on Hpux Non-Trusted machine

If it's non-trusted then I'm not sure you can get it. Trusted systems add these additional tidbits of info.

But...you might be able to set something up from this point forward.
If password aging is set on the user account, then in their home directory create a file that has days set in it. Every nite run a cron job than reduces the file by a count of 1. You could play with it and add the date in this little aging file whenever the file value is set to the High value, so you always have that as the changed passwd date.

To avoid passwords being reset early or out of schedule, you could manage that in the /etc/default/security file.

There's holes in this I know that would need tuning, but maybe on a non-trusted system they could be worked out.

Just a thought,
Rita
rariasn
Honored Contributor

Re: How to get Password Last changed for a user on Hpux Non-Trusted machine

Hi,


logins -ax -l

man logins


rgs,
Basi Reddy
Occasional Contributor

Re: How to get Password Last changed for a user on Hpux Non-Trusted machine

If I set the password ageing using following command

passwd -x 3 -n 9 test1

and output of the passwd -s test1 is

test2 PS 12/11/08 14 7
14 - min, that must transpire before the user can change the password
7 - max, a password can remain unchanged

What will the date stands for?
12/11/08 -

Is it the password last changed date(approx)?
Dennis Handly
Acclaimed Contributor

Re: How to get Password Last changed for a user on Hpux Non-Trusted machine

>What will the date stands for? 12/11/08
>Is it the password last changed date(approx)?

Yes, that's what I found when I did it. Dec 11, 2008.