Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Member
    Join Date
    May 2007
    Posts
    78

    Default rootkithunter, how to set it up as a cron?

    How can I set rootkithunter up to send me an email once a week with the results of my scan?

  2. #2
    Member
    Join Date
    Mar 2008
    Location
    Amsterdam, Netherlands
    Posts
    102

    Default

    Hi,

    Try this:
    9 3 * * * (/usr/local/bin/rkhunter --cronjob -l --nomow --rwo | mail -s "[PUT IN MEANINGFUL SERVER NAME] rkhunter output" [VALID EMAIL ADDRESS])

    change the [servername] and [e-mail address] parts
    This will check daily.

    Ronald.

  3. #3
    Member
    Join Date
    May 2007
    Posts
    78

    Default

    I copy the 9 3 * * * as well?

  4. #4
    Member
    Join Date
    Mar 2008
    Location
    Amsterdam, Netherlands
    Posts
    102

    Default

    Quote Originally Posted by bls24 View Post
    I copy the 9 3 * * * as well?
    Yep.

    +---------------- minute (0 - 59)
    | +------------- hour (0 - 23)
    | | +---------- day of month (1 - 31)
    | | | +------- month (1 - 12)
    | | | | +---- day of week (0 - 7) (Sunday=0 or 7)
    | | | | |
    * * * * * command to be executed

    I have it scheduled to run a little over 3 o'clock
    You can change the time if you like to have an other schedule.

    Ronald.

  5. #5
    Member
    Join Date
    May 2007
    Posts
    78

    Default

    Am I doing anything incorrectly? It's not sending.

    35 9 * * * /usr/local/bin/rkhunter --cronjob -l --nomow --rwo | mail -s "rkhunter output" [myemail]


    Also tried:
    35 9 * * * (/usr/local/bin/rkhunter --cronjob -l --nomow --rwo | mail -s "rkhunter output" [myemail])

  6. #6
    Member
    Join Date
    Mar 2008
    Location
    Amsterdam, Netherlands
    Posts
    102

    Default

    Quote Originally Posted by bls24 View Post
    Am I doing anything incorrectly? It's not sending.

    35 9 * * * /usr/local/bin/rkhunter --cronjob -l --nomow --rwo | mail -s "rkhunter output" [myemail]


    Also tried:
    35 9 * * * (/usr/local/bin/rkhunter --cronjob -l --nomow --rwo | mail -s "rkhunter output" [myemail])
    Did you put your email without the brackets?

    Ronald.

  7. #7
    Member ravindradhainwa's Avatar
    Join Date
    Jan 2008
    Posts
    42

    Default

    Hello,

    Add cron for rkHunter :

    vi /etc/cron.daily/rkhunter.sh
    #!/bin/bash
    (/usr/local/bin/rkhunter --update && /usr/local/bin/rkhunter -c --nocolors --skip-keypress --summary 2>&1 | mail -s "RKhunter Scan Details" username@yourdomain.com)
    chmod a+x /etc/cron.daily/rkhunter.sh

    Add cron for chkrootkit :

    touch /etc/cron.daily/chkrootkit.sh
    Next, use your favorite text editor, and add the following text to the chkrootkit.sh file.
    #!/bin/bash
    cd /usr/local/src/chkrootkit-0.43/
    ./chkrootkit 2>&1 | mail -s "chkrootkit Scan” username@yourdomain.com

    chmod a+x /etc/cron.daily/chkrootkit.sh

    Regards,

    Ravindra Dhainwal
    http://www.Host.co.in
    cPanel Reseller Hosting
    Last edited by ravindradhainwa; 08-11-2008 at 04:00 PM.

Similar Threads & Tags
Similar threads

  1. set up cron for chkrootkit
    By thelunatic in forum Security
    Replies: 9
    Last Post: 08-30-2011, 04:36 AM
  2. set cron to run by GMT
    By muresanalex in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 03-10-2011, 09:25 AM
  3. How to set cron job through shell ?
    By billau in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 08-15-2004, 11:22 PM
  4. How to set cron job through shell ?
    By billau in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 07-17-2004, 06:10 PM
  5. how to set cron jobs
    By Archon in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 07-13-2004, 02:53 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube