How can I set rootkithunter up to send me an email once a week with the results of my scan?
How can I set rootkithunter up to send me an email once a week with the results of my scan?
Hi,
Try this:
9 3 * * * (/usr/local/bin/rkhunter --cronjob -l --nomow --rwo | mail -s "[PUT IN MEANINGFUL SERVER NAME] rkhunter output" [VALID EMAIL ADDRESS])
change the [servername] and [e-mail address] parts
This will check daily.
Ronald.
I copy the 9 3 * * * as well?
Yep.
+---------------- minute (0 - 59)
| +------------- hour (0 - 23)
| | +---------- day of month (1 - 31)
| | | +------- month (1 - 12)
| | | | +---- day of week (0 - 7) (Sunday=0 or 7)
| | | | |
* * * * * command to be executed
I have it scheduled to run a little over 3 o'clock
You can change the time if you like to have an other schedule.
Ronald.
Am I doing anything incorrectly? It's not sending.
35 9 * * * /usr/local/bin/rkhunter --cronjob -l --nomow --rwo | mail -s "rkhunter output" [myemail]
Also tried:
35 9 * * * (/usr/local/bin/rkhunter --cronjob -l --nomow --rwo | mail -s "rkhunter output" [myemail])
Hello,
Add cron for rkHunter :
vi /etc/cron.daily/rkhunter.sh
#!/bin/bash
(/usr/local/bin/rkhunter --update && /usr/local/bin/rkhunter -c --nocolors --skip-keypress --summary 2>&1 | mail -s "RKhunter Scan Details" username@yourdomain.com)
chmod a+x /etc/cron.daily/rkhunter.sh
Add cron for chkrootkit :
touch /etc/cron.daily/chkrootkit.sh
Next, use your favorite text editor, and add the following text to the chkrootkit.sh file.
#!/bin/bash
cd /usr/local/src/chkrootkit-0.43/
./chkrootkit 2>&1 | mail -s "chkrootkit Scan” username@yourdomain.com
chmod a+x /etc/cron.daily/chkrootkit.sh
Regards,
Ravindra Dhainwal
http://www.Host.co.in
cPanel Reseller Hosting
Last edited by ravindradhainwa; 08-11-2008 at 04:00 PM.