Operating System - HP-UX
1752852 Members
3779 Online
108790 Solutions
New Discussion юеВ

Re: PS and LK parameter while using logins command

 
Chris Bentley
Advisor

PS and LK parameter while using logins command

When using the logins command it returns either an LK or PS field. Can anyone shed any light on how you can change the PS flag to LK ? I have tried modprpw/usermod etc ... but all to no avail.
5 REPLIES 5
A. Clay Stephenson
Acclaimed Contributor

Re: PS and LK parameter while using logins command

It depends upon why the account is locked. Do a "/usr/lbin/getprpw user" and examine the lockout reason(s). Each non-zero digit in the lockout value corresponds to a reason. Man 1m getprpw for details.
If it ain't broke, I can fix that.
Chris Bentley
Advisor

Re: PS and LK parameter while using logins command

I have checked out the modprpw command and the LK value corresponds to a * (asterisk) in the password field of the user in the passwd file. What I am trying to do is force the LK value on. The only way I seem to be able to do that is by editing the passwd file and putting a * in the password field. I am trying to find a command that will set the LK value rather than put an * in the passwd file.
vinod_25
Valued Contributor

Re: PS and LK parameter while using logins command

hi chris

The -x option specifies that the logins command should display extended information about selected users. This extended information includes home directory, login shell and password aging data, each on its own line. Password information consists of password status (PS for valid password, LK for locked and NP for no password) and, if a password is
present, date of last change, required number of days between changes,and number of days allowed between changes.

Regards

Vinod K
Neil Wilson_2
Valued Contributor

Re: PS and LK parameter while using logins command

Ah Mr Bentley, I see your dealing with user problems these days.. keeping your hand in.

I assume you are on a trusted system? and as such the user password is in their file under /tcb/auth/files etc?? Does the password field have a *LK* in it? e.g.

syd:*LK*:8776:0:168:7:::

maybe remove the entire password from the field and try to regen the password?

Chris Bentley
Advisor

Re: PS and LK parameter while using logins command

Neil,

Yes the system is trusted but the password field contains a * and not LK. This is the only way I can find to get "logins" to report LK. Unfortunately this is a manual process and I was rather looking for a command that changes the status from PS to LK.