Operating System - HP-UX
1834510 Members
3253 Online
110068 Solutions
New Discussion

which accounts are disabled?

 
SOLVED
Go to solution
Carol Livingston
Occasional Contributor

which accounts are disabled?

How can I tell which accounts are disabled on a trusted system?

thanks
Carol Livingston
3 REPLIES 3
Paul Sperry
Honored Contributor
Solution

Re: which accounts are disabled?

One way is to go into sam
Accounts for users and groups
View---> Columns

add the activated column


James Murtagh
Honored Contributor

Re: which accounts are disabled?

Hi Carol,

This is not a very clean way, especially if you have lots of users, but you could do something like:

# for i in $(cat /etc/passwd|awk -F: '{print $1}')
> do
> echo "$i: \c"
> getprpw -m lockout $i
> done

For each user this will print out a bit field like:

james: lockout=0000000
oracle: lockout=0000001

All fields being 0 means the account is still active, the position of the 1 tells you why it was deactivated. See "man getprpw" for a list of the field values.

I'm sure you would use auditing or accounting to do this normally, try this link to find out more:

http://www.docs.hp.com/hpux/onlinedocs/B2355-90742/B2355-90742.html

Regards,

James.
Uday_S_Ankolekar
Honored Contributor

Re: which accounts are disabled?


In ITO there is something called list of suspended users (The actual executable is 'listsusp') You can configure your ITO template to send you an e-mail of list of disabled users.

Infact the script gets info from getprpw command.

Try /usr/lbin/getprpw -l username and look for lockout bit. If lockout value is other than zero then account is disabled. Man page for getprpw would give you more information on this.

-USA..
Good Luck..