Chkrootkit Cronjob: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
Zeile 10: Zeile 10:
  
 
  RUN_DAILY="true"
 
  RUN_DAILY="true"
 +
 +
=Chkrootkit Report per Mail=
 +
==Manueller Cronjob==
 +
0 3 * * *    (/usr/sbin/chkrootkit 2>&1 | mail -s "chkrootkit output" technik@xxx.de)
 +
*Warnungen werden hier an die Email technik@xxx.de geschickt
 +
====
 +
*Bearbeite /etc/chkrootkit.conf und füge Folgendes hinzu
 +
REPORT_EMAIL="deine@email.com"
 +
 +
*Bearbeite /etc/cron.daily/chkrootkit ersetzte $CHKROOTKIT $RUN_DAILY_OPTS mit
 +
 +
$CHKROOTKIT > $LOG_DIR/chkrootkit.log #Run chkrootkit and save the logfile
 +
(
 +
echo "Subject: [chkrootkit] $(hostname -f) - Daily report" #Create subject line using the hostname
 +
echo "To: $REPORT_EMAIL" #Insert To: delivery email address using the variable defined in chkrootkit.conf
 +
echo ""
 +
cat $LOG_DIR/chkrootkit.log #Concat the logfile to the output
 +
) | /usr/sbin/sendmail $REPORT_EMAIL #Send out the email!

Version vom 20. Oktober 2022, 14:54 Uhr

Cronjob

/etc/chkrootkit.conf

sudo vi /etc/chkrootkit.conf
  • Ändern Sie die Zeile von:
RUN_DAILY="false"

zu

RUN_DAILY="true"

Chkrootkit Report per Mail

Manueller Cronjob

0 3 * * *    (/usr/sbin/chkrootkit 2>&1 | mail -s "chkrootkit output" technik@xxx.de)
  • Warnungen werden hier an die Email technik@xxx.de geschickt

==

  • Bearbeite /etc/chkrootkit.conf und füge Folgendes hinzu
REPORT_EMAIL="deine@email.com"
  • Bearbeite /etc/cron.daily/chkrootkit ersetzte $CHKROOTKIT $RUN_DAILY_OPTS mit

$CHKROOTKIT > $LOG_DIR/chkrootkit.log #Run chkrootkit and save the logfile ( echo "Subject: [chkrootkit] $(hostname -f) - Daily report" #Create subject line using the hostname echo "To: $REPORT_EMAIL" #Insert To: delivery email address using the variable defined in chkrootkit.conf echo "" cat $LOG_DIR/chkrootkit.log #Concat the logfile to the output ) | /usr/sbin/sendmail $REPORT_EMAIL #Send out the email!