rk hunter cron email
I'm using your rkhunter n my centos 6.5. I tested this script on 5.10 and the email report was working fine. on 6.5 its not working. the email attachment shows a name "noname" 1kb. I couldnt open that. Please refer attached screenshot
my daily cron :
[/etc/cron.daily]# cat rkhunter.sh
#!/bin/sh
(
/usr/local/bin/rkhunter --versioncheck
/usr/local/bin/rkhunter --update
/usr/local/bin/rkhunter --cronjob
) | /bin/mail -s 'rkhunter Daily Run (PutYourServerNameHere)' xxxxxxxxxgmail.com
Please advise
Thanks
-
Hello, Can you please try to use following code in your rkhunter.sh and check it #!/bin/bash /usr/local/bin/rkhunter -c --cronjob 2>&1 | mail -s "Rkhunter daily run on `uname -n`" email@domain.com0 -
[quote="24x7server, post: 1636371">Hello, Can you please try to use following code in your rkhunter.sh and check it #!/bin/bash /usr/local/bin/rkhunter -c --cronjob 2>&1 | mail -s "Rkhunter daily run on `uname -n`" email@domain.com
That didnt work.. normally this is what i see online : #!/bin/sh ( /usr/local/bin/rkhunter --versioncheck /usr/local/bin/rkhunter --update /usr/local/bin/rkhunter --cronjob ) | /bin/mail -s 'rkhunter Daily Run (PutYourServerNameHere)' email@email.com not sure why this is not working... I received attachment report via email, when i opened i see only : ================================= [ Rootkit Hunter version 1.4.2 ] [1;33mChecking rkhunter version... [0;39m This version : 1.4.2 Latest version: 1.4.2 [ Rootkit Hunter version 1.4.2 ] [1;33mChecking rkhunter data files... [0;39m Checking file mirrors.dat [34C[ [1;32mNo update [0;39m ] Checking file programs_bad.dat [29C[ [1;32mNo update [0;39m ] Checking file backdoorports.dat [28C[ [1;32mNo update [0;39m ] Checking file suspscan.dat [33C[ [1;32mNo update [0;39m ] Checking file i18n/cn [38C[ [1;32mNo update [0;39m ] Checking file i18n/de [38C[ [1;32mNo update [0;39m ] Checking file i18n/en [38C[ [1;32mNo update [0;39m ] Checking file i18n/tr [38C[ [1;32mNo update [0;39m ] Checking file i18n/tr.utf8 [33C[ [1;32mNo update [0;39m ] Checking file i18n/zh [38C[ [1;32mNo update [0;39m ] Checking file i18n/zh.utf8 [33C[ [1;32mNo update [0;39m ] ================================= it should show complete report...0 -
Hello :) Please keep in mind that RKHunter is a third-party application that's not developed by cPanel. Do you notice any different behavior when you run the script manually instead of as a cron job? Thank you. 0
Please sign in to leave a comment.
Comments
3 comments