Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 73432 - rkhunter cronjob script
Summary: rkhunter cronjob script
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: Aaron Walker (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-05 04:08 UTC by smouge
Modified: 2004-12-07 10:29 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description smouge 2004-12-05 04:08:56 UTC
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.
Comment 1 Aaron Walker (RETIRED) gentoo-dev 2004-12-05 11:04:48 UTC
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.
Comment 2 Aaron Walker (RETIRED) gentoo-dev 2004-12-07 02:22:18 UTC
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.
Comment 3 smouge 2004-12-07 10:29:32 UTC
Worked like a charm.

Many thanks. I also liked that you have placed the output of the update routine in the report mail.