How to add rkhunter to a cronjob
we know that automation and email notification make an administrator’s life a lot easier, so now we can add rkhunter to a cronjob.
This is straight from the rkhunter website: You need to create a short shell script as follows:
( /usr/bin/rkhunter –versioncheck
/usr/bin/rkhunter –update
/usr/bin/rkhunter –cronjob –report-warnings-only
) | /usr/bin/mail -s “rkhunter output” admin@yourdomain.com
Save the file and call it something like ‘rkhunterscript’. Make the file executable:
and place it in your local bin folder or in a public bin folder. Now set a root cronjob as follows:
cronjob looks like this:
This will run the script at 3.10am each day
Leave a Reply
You must be logged in to post a comment.