6.2.4.3 Ensure audit log files group owner is configured
Audit#
Run the following command to verify log_group parameter is set to either adm or root in /etc/audit/auditd.conf:
Nothing should be returnedUsing the path of the directory containing the audit logs, verify audit log files are owned by the "root" or "adm" group by running the following script:
Remediation#
Run the following command to configure the audit log files to be group owned by adm:
find $(dirname $(awk -F"=" '/^\s*log_file/ {print $2}' /etc/audit/auditd.conf | xargs)) -type f \( ! -group adm -a ! -group root \) -exec chgrp adm {} +
Run the following command to set the log_group parameter in the audit configuration file to log_group = adm:
Run the following command to restart the audit daemon to reload the configuration file: