Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

rootkithunter, how to set it up as a cron?

Discussion in 'General Discussion' started by bls24, Jul 6, 2008.

  1. bls24

    bls24 Well-Known Member

    Joined:
    May 12, 2007
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    156
    How can I set rootkithunter up to send me an email once a week with the results of my scan?
     
  2. hydra

    hydra Well-Known Member

    Joined:
    Mar 26, 2008
    Messages:
    102
    Likes Received:
    1
    Trophy Points:
    68
    Location:
    Amsterdam, Netherlands
    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. bls24

    bls24 Well-Known Member

    Joined:
    May 12, 2007
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    156
    I copy the 9 3 * * * as well?
     
  4. hydra

    hydra Well-Known Member

    Joined:
    Mar 26, 2008
    Messages:
    102
    Likes Received:
    1
    Trophy Points:
    68
    Location:
    Amsterdam, Netherlands
    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. bls24

    bls24 Well-Known Member

    Joined:
    May 12, 2007
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    156
    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. hydra

    hydra Well-Known Member

    Joined:
    Mar 26, 2008
    Messages:
    102
    Likes Received:
    1
    Trophy Points:
    68
    Location:
    Amsterdam, Netherlands
    Did you put your email without the brackets?

    Ronald.
     
  7. ravindradhainwa

    ravindradhainwa Well-Known Member

    Joined:
    Jan 24, 2008
    Messages:
    45
    Likes Received:
    1
    Trophy Points:
    56
    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
     
    #7 ravindradhainwa, Jul 22, 2008
    Last edited: Aug 11, 2008
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice