Skip to content

Verify Group Who Owns /etc/crypttab File

An XCCDF Rule

Description

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

$ sudo chgrp root /etc/crypttab

Rationale

The ownership of the /etc/crypttab file by the root group 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_groupowner_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

chgrp -L root /etc/crypttab