Operating System - HP-UX
1829563 Members
1485 Online
109992 Solutions
New Discussion

User status in non-trusted systems

 
Starrynight_1
Advisor

User status in non-trusted systems

Hello all

Does anyone knows if one can determine by command line the state of a user (locked or not) in a non-trusted system? If so, how?

Thanks

SN
4 REPLIES 4
James Beamish-White
Trusted Contributor

Re: User status in non-trusted systems

In a non-trusted sytem? Wierd.

I think it's just the format of the passwd entry - in sun, *LK* means locked, HP may be the same in non-trusted mode.

I.e. in answer to your command, grep username /etc/passwd

Cheers!
James
GARDENOFEDEN> create light
John Poff
Honored Contributor

Re: User status in non-trusted systems

Hi,

On my systems (all non-trusted), I just check for an '*' in the password field of /etc/passwd. I don't know of any commands that will report the status of an account from the command line.

JP
Darren Prior
Honored Contributor

Re: User status in non-trusted systems

Hi,

In a non-trusted system all you can go on is whether the password field of /etc/passwd contains an asterisk to show that it's locked. logins(1M) can do this with the -x option, otherwise you could write a simple script that uses awk to parse the file. See also passwd(4) for info on the file structure.

regards,

Darren.
Calm down. It's only ones and zeros...
Michael Campbell
Trusted Contributor

Re: User status in non-trusted systems

SN

If you run logins -ax -l it will give you the status, PS for valid password, LK for locked and NP is for no password.

Hope This Helps

Michael