Verify Who Owns /etc/shells File
An XCCDF Rule
Description
To properly set the owner of /etc/shells
, run the command:
$ sudo chown root /etc/shells
Rationale
The /etc/shells
file contains the list of full pathnames to shells on the system.
Since this file is used by many system programs this file should be protected.
- ID
- xccdf_org.ssgproject.content_rule_file_owner_etc_shells
- Severity
- Medium
- References
- Updated
Remediation - Ansible
- name: Test for existence /etc/shells
stat:
path: /etc/shells
register: file_exists
tags:
- CCE-87055-0
Remediation - Shell Script
chown 0 /etc/shells