I’m looking for a way to search the /etc/security/failedlogin file for the current days date and then get a list of the failed logins along with the number of times the login failed. The way I’m doing it just isn’t working:
#/bin/ksh
date > /tmp/date.out
CURRENT_DATE=`cut -c5,6,7,8,9,10,11 /tmp/date.out`
who /etc/security/failedlogin | grep "$CURRENT_DATE" | sort > /tmp/failedlogins.out
uniq –c /tmp/failedlogins.out
Thanks.
Shane
#/bin/ksh
date > /tmp/date.out
CURRENT_DATE=`cut -c5,6,7,8,9,10,11 /tmp/date.out`
who /etc/security/failedlogin | grep "$CURRENT_DATE" | sort > /tmp/failedlogins.out
uniq –c /tmp/failedlogins.out
Thanks.
Shane