Forum Discussion
JPrice_230829
Jan 07, 2016Nimbostratus
With some help form a coworker this is what I ended up with:
startdate=$( aureport -au | tail -2 | head -1 | awk '{print $2}' )
starttime=$( aureport -au | tail -2 | head -1 | awk '{print $3}' )
failcountt=$(aureport -au --start $startdate $starttime | grep $USER | grep no | wc -l)
echo "Failed login attempts since your last successful login: ${failcount}"