Skip to content

Enable cron Service

An XCCDF Rule

Description

The crond service is used to execute commands at preconfigured times. It is required by almost all systems to perform necessary maintenance tasks, such as notifying root of system activity. The cron service can be enabled with the following manifest:

---
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
  labels:
    machineconfiguration.openshift.io/role: master
  name: 75-master-cron-enable
spec:
  config:
    ignition:
      version: 3.1.0
    systemd:
      units:
      - name: cron.service
        enabled: true

This will enable the cron service in all the nodes labeled with the "master" role.

Note that this needs to be done for each MachineConfigPool

For more information on how to configure nodes with the Machine Config Operator see the relevant documentation.

Rationale

Due to its usage for maintenance and security-supporting tasks, enabling the cron daemon is essential.

ID
xccdf_org.ssgproject.content_rule_service_cron_enabled
Severity
Medium
References
Updated