Skip to content

Verify Permissions on /etc/cron.allow file

An XCCDF Rule

Description

If /etc/cron.allow exists, it must have permissions 0600 or more restrictive. To properly set the permissions of /etc/cron.allow, run the command:

$ sudo chmod 0600 /etc/cron.allow

Rationale

If the permissions of the cron.allow file are not set to 0600 or more restrictive, the possibility exists for an unauthorized user to view or edit sensitive information.

ID
xccdf_org.ssgproject.content_rule_file_permissions_cron_allow
Severity
Medium
References
Updated



Remediation - Shell Script

# Remediation is applicable only in certain platforms
if rpm --quiet -q kernel; then

chmod u-xs,g-xwrs,o-xwrt /etc/cron.allow

else

Remediation - Ansible

- name: Gather the package facts
  package_facts:
    manager: auto
  tags:
  - CCE-86876-0
  - PCI-DSSv4-2.2