Receive notifications when someone logs in on your Server
Loging as root to your server and:
Edit bash_profile
# nano .bash_profile
Now, add to the bottom of the file:
echo 'ALERT - Root Shell Access on:' `date` `who` mail -s "Root has been loged into by `who awk '{print $6}'`" youremail@yourdomain.com
Now, you will receive a notification on your email when someone logs in as root on your server. Note that if possible you should intert and "offside" email address in order to keep sure that you receive if your system is compromised.
4:32 AM
|
Tags:
security
|
This entry was posted on 4:32 AM
and is filed under
security
.
You can follow any responses to this entry through
the RSS 2.0 feed.
You can leave a response,
or trackback from your own site.
0 Comments:
Post a Comment