Operating System - HP-UX
1837594 Members
4539 Online
110117 Solutions
New Discussion

Re: passwd -s not displaying information

 
Gary Hines
Advisor

passwd -s not displaying information

I have a script that displays how many days are left before a user needs to change their password. I use the passwd -s option to get the date it was last changed. However, for some (a very few) users the information does not show up, and the man page says that if password aging information is not present then this would happen.

My question is how can a person's password aging information not be present, and what can I do to make it present? Any help would be greatly appreciated. TIA.

Gary Hines
4 REPLIES 4
Tim Nelson
Honored Contributor

Re: passwd -s not displaying information

Are you running HPUX Trusted Password System ?

passwd -s myuser only returns PS

On trusted system "getprpw -m spwchg myuser" can give you the last successfull change.

It also has a setting to warn the users x days.

(although I hear HPUX Trusted is being obsoleted by the opensource shadow password system someday)



Dennis Handly
Acclaimed Contributor

Re: passwd -s not displaying information

>how can a person's password aging information not be present, and what can I do to make it present?

For non-trusted, I assume any user that doesn't have this extra ",xxx" field on the end of the password. You can use passwd(1) to change this, -x and -n options.
Grayh
Trusted Contributor

Re: passwd -s not displaying information

Enter SAM-> Account for user and Groups->User -> add user
Choose aging buttion and input information you want

Also the following threads might be of good help

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=971306&admit=-682735245+1131094486899+28353475

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=988361&admit=-682735245+1136364254224+28353475
Gary Hines
Advisor

Re: passwd -s not displaying information

It looks like the getprpw command gets what I need, so I'm going to change my script to use that. Thanks for all the help!