Linux Security Enhancement: Automatic Email Notification On Root Login.

No GoodNeed ImprovementOKGoodExcellent (No Ratings Yet)
Loading ... Loading ...

To make your linux box safer, you can add the following line to the end of your .bash_profile file under /root directory. You can use vi or pico to edit the file:

echo 'ALERT - Root Shell Access on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d"(" -f2 | cut -d")" -f1`" root@gmail.com

replace root@gmail.com with your email address.

Popularity: 1%

Leave a Comment

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word