Linux distributions
TMA-UBUNTU2604-6.2.2.2
Ensure audit logs are not automatically deleted
낮음레벨 2자동linux
설명
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.
점검 방법
감사 방식: 셸 명령
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- 예상 출력
compliant
조치 방법
조치 방식: 가이드 또는 인프라 패치
Set the following parameter in /etc/audit/auditd.conf: max_log_file_action = keep_logs
속성
- 운영 체제
- ubuntu-26.04
- 태그
- cis-convertedlinux
- 참고 자료
- CIS Ubuntu Linux 26.04 LTS Benchmark v1.0.0 - 6.2.2.2
이 호스트 점검하기
감사 권한이 있는 시스템에서 실행하세요. 스캔은 읽기 전용입니다.
shell
tmaegis scan --target linux --level 2