Skip to content

Verify User Who Owns /etc/crypttab File

An XCCDF Rule

Description

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

$ sudo chown root /etc/crypttab 

Rationale

The ownership of the /etc/crypttab file by the root user 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_owner_etc_crypttab
Severity
Medium
References
Updated



Remediation - Ansible

- name: Test for existence /etc/crypttab
  stat:
    path: /etc/crypttab
  register: file_exists
  tags:
  - configure_strategy

Remediation - Shell Script

chown -L 0 /etc/crypttab