How to Configure Email Alerts for Rootkit Hunter (Rkhunter)
December 25 2014
We have already discussed about how to install the Rootkit Hunter in Linux operating system. Now set up email alert to you daily.
Create a shell file in cron.daily
# vim /etc/cron.daily/rkhuntercron.sh
Add the following code:
#!/bin/sh
(
/usr/local/bin/rkhunter --versioncheck
/usr/local/bin/rkhunter --update
/usr/local/bin/rkhunter --cronjob --report-warnings-only
) | /bin/mail -s 'rkhunter Daily Run (your server name)' emailid@email.com
Then, file permission change to be executable,
# chmod 755 /etc/cron.daily/rkhuntercron.sh
Finally, restart your cronjob service.
# /etc/init.d/crond restart
Comments (0)