Skip to content

2.4.1.1 Ensure cron daemon is enabled and active

Audit#

- IF - cron is installed on the system: Run the following command to verify cron is enabled:

# systemctl list-unit-files | awk '$1~/^crond?\.service/{print $2}'
enabled

Run the following command to verify that cron is active:

# systemctl list-units | awk '$1~/^crond?\.service/{print $3}'
active

Remediation#

- IF - cron is installed on the system: Run the following command to enable and start cron:

# systemctl unmask "$(systemctl list-unit-files | awk '$1~/^crond?\.service/{print $1}')"
# systemctl --now enable "$(systemctl list-unit-files | awk '$1~/^crond?\.service/{print $1}')"