Verify User Who Owns passwd File
An XCCDF Rule
Description
To properly set the owner of/etc/passwd
, run the command: $ sudo chown root /etc/passwd
Rationale
The /etc/passwd
file contains information about the users that are configured on
the system. Protection of this file is critical for system security.
- ID
- xccdf_org.ssgproject.content_rule_file_owner_etc_passwd
- Severity
- Medium
- References
- Updated
Remediation Templates
An Ansible Snippet
- name: Test for existence /etc/passwd
stat:
path: /etc/passwd
register: file_exists
tags:
- CJIS-5.5.2.2
A Shell Script
chown -L 0 /etc/passwd