Sunday, December 1, 2013

Finding last reboot, shutdown time and failed login attempts

Finding last reboot time:
# last reboot
# last -F
# who -b

Finding last shutdown time:
# last -x | grep '^shutdown'

Listing out failed login attempts:
# lastb

The other straight forward way to find the failed login attempts is to analyze the /var/log/secure file. I have written a Perl script exclusively to report the failed login attempts by parsing the /var/log/secure file.

1 comment: