安装与启用
安装与启用
dnf install -y audit
systemctl enable --now auditd
systemctl status auditd | head -5
auditctl -s # 查看审计子系统状态(enabled=1 生效中)
cat /etc/audit/auditd.conf | grep -vE '^#|^$'| 主配置文件 | /etc/audit/auditd.conf |
|---|---|
| 规则目录 | /etc/audit/rules.d/(augenrules 合并) |
| 日志位置 | /var/log/audit/audit.log |
auditd 与 systemd-journald 相互独立:审计事件主要落 audit.log,部分事件也会出现在 journalctl 中,排查按需两边看。