Linux distributions
TMA-ROCKY10-6.3.1.4
Ensure auditd service is enabled and active
LowLevel 2Automatedlinux
Description
Turn on the auditd daemon to record system events.
How it is checked
Audit method: Shell command
shell
alt0() { command -v grep >/dev/null 2>&1 || { echo "step1: grep not installed"; return 1; }; command -v systemctl >/dev/null 2>&1 || { echo "step1: systemctl not installed"; return 1; }; o=$(bash -c 'systemctl is-enabled auditd | grep '"'"'^enabled'"'"'' 2>&1); printf '%s\n' "$o" | tr -s ' \t' ' ' | sed 's/^ //;s/ $//' | grep -Fxq -- enabled || { echo step1: missing enabled; return 1; }; command -v grep >/dev/null 2>&1 || { echo "step2: grep not installed"; return 1; }; command -v systemctl >/dev/null 2>&1 || { echo "step2: systemctl not installed"; return 1; }; o=$(bash -c 'systemctl is-active auditd | grep '"'"'^active'"'"'' 2>&1); printf '%s\n' "$o" | tr -s ' \t' ' ' | sed 's/^ //;s/ $//' | grep -Fxq -- active || { echo step2: missing active; return 1; }; }; if alt0; then echo compliant; fi- Expected output
compliant
How it is fixed
Fix method: Guidance or infrastructure patch
Run the following commands to unmask, enable and start auditd: # systemctl unmask auditd # systemctl enable auditd # systemctl start auditd
Properties
- Operating systems
- rocky-10
- Tags
- cis-convertedlinux
- Reference
- CIS Rocky Linux 10 Benchmark v1.0.0 - 6.3.1.4
Check this host
Run this on a machine you are allowed to audit. The scan is read-only.
shell
tmaegis scan --target linux --level 2