Regarding created file /etc/cron.daily/rkhunter A couple of very small requests: Would be nice to add to the cronjob script a line to update the rkhunter database like: # first update the database /usr/bin/rkhunter --update &> /dev/null In this way the database gets updated everyday. Else wise the database never gets updated? Also would be nice to add the creation of a logfile to the cron job settings: RKHUNTER_EXEC="/usr/bin/rkhunter" RKHUNTER_OPTS="--checkall --cronjob --skip-keypress --createlogfile" Reproducible: Always Steps to Reproduce: 1. 2. 3.
Why, that's a great idea ;) Especially the logfile, because if a user doesn't have a MTA setup, he'll never know the output of rkhunter... I'll take care of this either some time today or first thing in the morning.
Ok, since I'm at least 10x more knowledgable wrt scripting than I was when I first wrote that cron job, I decided to rewrite it ;p In addition to the stuff you have requested, I decided to add a couple other features (and even went as far as patching rkhunter's --createlogfile to accept an optional filename argument for specifying an alternate log file location). I also added a SAVE_OLD_LOGS config option, so that old logs dont get overwritten every time rkhunter runs. I've also added a LOGFILE_PERMS option, in case the user would like different permissions (it's world readable by default). rkhunter-1.1.8-r1 is in CVS. Please test (mainly the cron script) if you could be so kind, and reopen this bug, if necessary. Thanks for request; in addition to motivating me to provide a more enhanced cron script, you also gave me something to do at work last night ;) Cheers.
Worked like a charm. Many thanks. I also liked that you have placed the output of the update routine in the report mail.