@test "Verify cron logging is enabled" {
run bash -c "grep '^cron.\*.*/var/log/cron.log$' /etc/rsyslog.d/50-default.conf"
[ "$status" -eq 0 ]
}
Verify cron logging is enabled
Description
Cron logging can be used to trace the successful or unsuccessful execution of cron jobs.
Rationale
Cron logging be used to spot intrusions into the use of the cron facility by unauthorized and malicious users.
Audit
Remediation
shell
sed -i 's/^#cron./cron./' /etc/rsyslog.d/50-default.conf