Operating System - HP-UX
1832650 Members
3125 Online
110043 Solutions
New Discussion

What field from getprpw indicates the password must be changed

 
SOLVED
Go to solution
Scott Lindstrom_2
Regular Advisor

What field from getprpw indicates the password must be changed

I have a menu that has an option that performs a 'modprpw -x' on a users ID.

I then have another option on the menu (that uses one of the scripts posted here) to display many of the fields from 'getprpw'. I would like to display something like "Password must be changed at next logon", but I do not see which of these fields actually indicates this.

After a 'modprpw -x' I do see the date of last password change apparently gets set to zeroes (since it displays as Jan 1, 1970...). I wonder if this is the trigger to force a password change at next logon?

Scott
4 REPLIES 4
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: What field from getprpw indicates the password must be changed

Yep, that's what happens. You can also do exactly the same thing with a passwd -f user
command. Sometimes it's a good idea to cd into /tcb/files/auth/u/username and do some before and after prints to see what passwd, modorpw, et al actually do.
If it ain't broke, I can fix that.
Scott Lindstrom_2
Regular Advisor

Re: What field from getprpw indicates the password must be changed

I finally did find an entry on the man page for modprpw that states:

-e This option is specified with a user name to expire the specified user's password. It zeroes the successful change time.

As a side note, this is made a bit more difficult to find because it appeasrs the field is referred to as 'spwchg' on getprpw, but as u_succhg' within the actual entry under /tcb/files/auth/... It would have been nice if the fields were consistently named.

Scott
Tom Danzig
Honored Contributor

Re: What field from getprpw indicates the password must be changed

FYI, attached is the "man" page fro getprpw (not documented).
Bill Hassell
Honored Contributor

Re: What field from getprpw indicates the password must be changed

FYI, getprpw (and modprpw) finally get an official man page but only on 11.11 systems. However, everyone can look at the man page on docs.hp.com: http://docs.hp.com/en/B9106-90008/getprpw.1M.html


Bill Hassell, sysadmin