I have Amazon Linux 2023 running in a Docker container and I would like to be able to load some custom audit rules into the kernel and ensure they are persisted when the container restarts. I have added the rules to /etc/audit/rules.d/audit.rules and can see them when I cat that file and I'm trying to use augenrules --load to load the rules. However, when I run this command the output I get is
/usr/sbin/augenrules: No change
You must be root to run this program.
I receive this same response even when running the command with sudo (sudo augenrules --load). I am already logged in as root (whoami returns root).
I wondered whether it could be be because auditd service is not started (in which case the output from augenrules is misleading) but I am unable to check that status of this service as service auditd status (and any other service command like service auditd start) command gives me
Redirecting to /bin/systemctl status auditd.service
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
ps -p1 indicates the PID 1 is bash
PID TTY TIME CMD
1 pts/0 00:00:00 bash
I assume this is because I'm running in a container but don't know if this is why augenrules refuses to run when I am the root user even when using using sudo.
What is causing this behaviour?