Sonora Communications, Inc.

  • Increase font size
  • Default font size
  • Decrease font size

Security - Root Login Detection

E-mail Print PDF

You can use these commands to check your Linux server for root logins. You cannot trust these commands to definitively show that your server has not been cracked as careful crackers may manipulate the output shown.

Check a Linux Server for Root Logins

The 'last' command uses the utmp and wtmp files to display login history.

last

The 'lastb' command shows failed login attempts.

lastb

This will show successful logins. There are always lots of unsuccessful ones.

cat /var/log/messages.*|grep Accepted 

or

cat /var/log/secure.*|grep Accepted 

This will do a reverse-lookup on an IP address to check an unknown login:

dig -x xxx.xxx.xxx.xxx

This will lookup a domain that you might be curious about.

whois domain.com
Last Updated on Monday, 04 May 2009 09:55  

Your external IP

You are connecting to this site from: 38.107.179.232

Secure Client Login

Email Address:

Password: