Linux distributions
TMA-UBUNTU2204-6.2.2.2
Ensure audit logs are not automatically deleted
NiskaNivo 2Automatskalinux
Opis
The max_log_file_action setting determines how to handle the audit log file reaching the max file size. A value of keep_logs will rotate the logs but never delete old logs.
Kako se proverava
Metod provere: Komanda ljuske
shell
alt0() { command -v grep >/dev/null 2>&1 || { echo "step1: grep not installed"; return 1; }; o=$(bash -c 'grep max_log_file_action /etc/audit/auditd.conf' 2>&1); printf '%s\n' "$o" | tr -s ' \t' ' ' | sed 's/^ //;s/ $//' | grep -Fxq -- 'max_log_file_action = keep_logs' || { echo step1: missing 'max_log_file_action = keep_logs'; return 1; }; }; if alt0; then echo compliant; fi- Očekivani izlaz
compliant
Kako se ispravlja
Metod ispravke: Smernica ili zakrpa infrastrukture
Set the following parameter in /etc/audit/auditd.conf: max_log_file_action = keep_logs
Svojstva
- Operativni sistemi
- ubuntu-22.04
- Oznake
- cis-convertedlinux
- Referenca
- CIS Ubuntu Linux 22.04 LTS Benchmark v3.0.0 - 6.2.2.2
Proverite ovaj računar
Pokrenite ovo na računaru za koji imate dozvolu za proveru. Skeniranje radi u režimu samo za čitanje.
shell
tmaegis scan --target linux --level 2