Linux distributions
TMA-ROCKY9-2.4.1.1
Ensure cron daemon is enabled and active
СредњаНиво 1Аутоматскаlinux
Опис
The cron daemon is used to execute batch jobs on the system.
Како се проверава
Метод провере: Команда љуске
shell
alt0() { command -v awk >/dev/null 2>&1 || { echo "step1: awk not installed"; return 1; }; command -v systemctl >/dev/null 2>&1 || { echo "step1: systemctl not installed"; return 1; }; o=$(bash -c 'systemctl list-unit-files | awk '"'"'$1~/^crond?\.service/{print $2}'"'"'' 2>&1); printf '%s\n' "$o" | tr -s ' \t' ' ' | sed 's/^ //;s/ $//' | grep -Fxq -- enabled || { echo step1: missing enabled; return 1; }; command -v awk >/dev/null 2>&1 || { echo "step2: awk not installed"; return 1; }; command -v systemctl >/dev/null 2>&1 || { echo "step2: systemctl not installed"; return 1; }; o=$(bash -c 'systemctl list-units | awk '"'"'$1~/^crond?\.service/{print $3}'"'"'' 2>&1); printf '%s\n' "$o" | tr -s ' \t' ' ' | sed 's/^ //;s/ $//' | grep -Fxq -- active || { echo step2: missing active; return 1; }; }; if alt0; then echo compliant; fi- Очекивани излаз
compliant
Како се исправља
Метод исправке: Смерница или закрпа инфраструктуре
- IF - cron is installed on the system: Run the following commands to unmask, 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}')"
Својства
- Оперативни системи
- rocky-9
- Ознаке
- cis-convertedlinux
- Референца
- CIS Rocky Linux 9 Benchmark v3.0.0 - 2.4.1.1
Проверите овај рачунар
Покрените ово на рачунару за који имате дозволу за проверу. Скенирање ради у режиму само за читање.
shell
tmaegis scan --target linux