Verify Permissions on crontab
An XCCDF Rule
Description
To properly set the permissions of /etc/crontab
, run the command:
$ sudo chmod 0600 /etc/crontab
Rationale
Service configuration files enable or disable features of their respective services that if configured incorrectly can lead to insecure and vulnerable configurations. Therefore, service configuration files should have the correct access rights to prevent unauthorized changes.
- ID
- xccdf_org.ssgproject.content_rule_file_permissions_crontab
- 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/crontab
else
Remediation - Ansible
- name: Gather the package facts
package_facts:
manager: auto
tags:
- CCE-82206-4
- NIST-800-53-AC-6(1)