debian-cis icon indicating copy to clipboard operation
debian-cis copied to clipboard

enable_cron.sh says cron is disabled even though it is enabled

Open lbr38 opened this issue 4 months ago • 3 comments

OS: Debian 12 Virt: LXC container Version of the debian-cis script: latest (pulled from master)

The script says that cron service is disabled even though it is enabled and started:

5.1.1_enable_cron         [ KO ] Check Failed
5.1.1_enable_cron         [ KO ] cron is disabled
5.1.1_enable_cron         [ KO ] Check Failed
● cron.service - Regular background program processing daemon
     Loaded: loaded (/lib/systemd/system/cron.service; enabled; preset: enabled)
     Active: active (running) since Thu 2025-08-07 09:09:38 CEST; 44min ago
       Docs: man:cron(8)
   Main PID: 98 (cron)
      Tasks: 1 (limit: 4915)
     Memory: 3.3M
     CGroup: /system.slice/cron.service
             └─98 /usr/sbin/cron -f

Debug log:

5.1.1_enable_cron         [DBG ] Audit argument detected, setting status to audit
5.1.1_enable_cron         [DBG ] Unknown option passed
5.1.1_enable_cron         [DBG ] Unknown option passed
5.1.1_enable_cron         [DBG ] Audit argument detected, setting status to audit
5.1.1_enable_cron         [DBG ] cron is installed
5.1.1_enable_cron         [DBG ] init process is not '/sbin/init'
5.1.1_enable_cron         [DBG ] host was not started using '/sbin/init', systemd should not be available
5.1.1_enable_cron         [ KO ] cron is disabled
5.1.1_enable_cron         [ KO ] Check Failed

I have no clue what to do. Looks like the issue is due to yesterday changes https://github.com/ovh/debian-cis/commit/a9d2e76cdbdafc75270fb2ff1080ff6336560662

Thanks for the help

lbr38 avatar Aug 07 '25 08:08 lbr38