Skip to content

Verify Permissions On /etc/crypttab File

An XCCDF Rule

Description

To properly set the permissions of /etc/crypttab, run the command:

$ sudo chmod 0600 /etc/crypttab

Rationale

Setting correct permissions on the /etc/crypttab file is important because this file hosts encrypted block devices configuration. Protection of this file is critical for system security. Assigning the ownership to root ensures exclusive control of the encrypted block devices configuration.

ID
xccdf_org.ssgproject.content_rule_file_permissions_etc_crypttab
Severity
Medium
References
Updated



Remediation - Ansible

- name: Test for existence /etc/crypttab
  stat:
    path: /etc/crypttab
  register: file_exists
  tags:
  - CCE-86369-6

Remediation - Shell Script





chmod u-xs,g-xwrs,o-xwrt /etc/crypttab