Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

lsuser grep for all account locked = true

Status
Not open for further replies.

saucyboy

Technical User
Feb 23, 2006
78
US
hi all

i need to do an lsuser ALL and pick out all the users that have there accounts locked to true

i used lsuser ALL | awk '{print $1,$27,$28,$29}'
the $27 $28 and $29 because the account locked could be in any of these fields depending on user but for some does not show

anyone have any clever ideas on how i can do this?

Thanx
 
What about:

lsuser ALL | grep -i "account_locked=true" |awk '{print $1,$27,$28,$29}'

 
If you just want the user:

lsuser ALL|awk '/account_locked=true/ {print $1}'
 
Hi thats great
but how can i change this so it shows the ccount status for all users,

so i would like to print the user name and account locked status to file or screen
 
something along the lines of
Code:
lsuser -a account_locked ALL #to screen
lsuser -a account_locked ALL > file # to file

Ceci n'est pas une signature
Columb Healy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top