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

@test "Verify cron logging is enabled" {
  run bash -c "grep '^cron.\*.*/var/log/cron.log$' /etc/rsyslog.d/50-default.conf"
  [ "$status" -eq 0 ]
}

Remediation

shell

sed -i 's/^#cron./cron./' /etc/rsyslog.d/50-default.conf

References

STIG-ID: UBTU-16-030460
STIG-ID: RHEL-07-021100

results matching ""

    No results matching ""