Get Email when someone Login by root
-
Hi friends everybuddy wanted security about their webserver and updated everytime
you can get an email when anybuddy login via root though ssh.To accomplish this you will need to edit the file .bash_profile.
At command prompt type the below command:pico .bash_profile
At the end of the file add following code:
echo ‘ALERT – Root Access from:’ `date` `who` | mail -s “Alert: Root Access from `who | awk ‘{print $6}’`” admin@gmail.com
Replace this with your email “admin@gmail.com”
If anybuddy login via ssh root then you will recieve an email.
2 Comments
Leave a Comment


November 7th, 2011 at 4:36 pm
Look around in the Cpanel and there should be an entry for managing databases. The root password is used for administering the database (creating tables, etc.) and many applications, like the ones that use PHP, will need it to function. You will probably be prompted to enter the database password when you do an installation.
December 28th, 2011 at 4:29 pm
Very easy step to help out with this. It is true that everyone needs their websites to be as secure as possible because of the new tactics that are now being used to hack into websites.