Chkrootkit Cronjob: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
 
Zeile 12: Zeile 12:
  
 
=Chkrootkit Report per Mail=
 
=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
 
 
==Tägliche emails von chkrootkit mit sendmail==
 
==Tägliche emails von chkrootkit mit sendmail==
 
*Bearbeite /etc/chkrootkit.conf und füge Folgendes hinzu
 
*Bearbeite /etc/chkrootkit.conf und füge Folgendes hinzu
Zeile 30: Zeile 27:
 
) | /usr/sbin/sendmail $REPORT_EMAIL #Send out the email!
 
) | /usr/sbin/sendmail $REPORT_EMAIL #Send out the email!
 
</pre>
 
</pre>
 +
 +
 +
==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

Aktuelle Version vom 24. Oktober 2022, 06:05 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

Tägliche emails von chkrootkit mit sendmail

  • 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!


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