Previously we have talked about how to install the RootKit hunter in Linux operating systems.
Now to set up daily email alerts follow the steps below:
Create a shell file under /etc/cron.daily/ with the help of your favorite editor:
nano /etc/cron.daily/rkhunter.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 (PutYourServerNameHere)' your@email.com
Set file permissions to be executable:
chmod 755 /etc/cron.daily/rkhuntercron.sh
Now restart your cron job service:
/etc/init.d/crond restart