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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

lsuser command 1

Status
Not open for further replies.

smicro

MIS
Dec 26, 2002
281
0
0
US
Had a question about lsuser. I wanted to get a report of unsuccessful login count and the login retries. I was thinking of using the command
lsuser -a loginretries unsuccessful_login_count ALL | grep unsuccessful_login_count but was curious if there was a way to script this so that it checks if the login count is greater than or equal to the retries and if it is then I would get an e-mail alert?
 
You could do sth like this (untested):

Code:
lsuser -a loginretries unsuccessful_login_count ALL|\
 grep unsuccessful_login_count|\
 tr '=' ' '|\
 while read user junk1 logret junk2 ulcount|\
 do
  if [ ${ulcount} -ge ${logret} ]
  then
   echo "Alert for ${user}"
  fi
 done

HTH,

p5wizard
 
Hi p5wizard,

Thanks for getting back to me and for the help! I tested this and I'm getting a do is not expected error. I'll try to get it working. Thanks for your help and pointing me in the right direction.
 
one |\ too many - told ya it was untested...

HTH,

p5wizard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top