Skip to content

Verify User Who Owns Backup shadow File

An XCCDF Rule

Description

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

$ sudo chgrp root /etc/shadow-

Rationale

The /etc/shadow- file is a backup file of /etc/shadow, and as such, it contains the list of local system accounts and password hashes. Protection of this file is critical for system security.

ID
xccdf_org.ssgproject.content_rule_file_groupowner_backup_etc_shadow
Severity
Medium
References
Updated



Remediation - Ansible

- name: Test for existence /etc/shadow-
  stat:
    path: /etc/shadow-
  register: file_exists
  tags:
  - CCE-83414-3

Remediation - Shell Script

chgrp 0 /etc/shadow-