Skip to content

Verify Group Who Owns /etc/shells File

An XCCDF Rule

Description

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

$ sudo chgrp 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_groupowner_etc_shells
Severity
Medium
References
Updated



Remediation - Ansible

- name: Test for existence /etc/shells
  stat:
    path: /etc/shells
  register: file_exists
  tags:
  - CCE-86624-4

Remediation - Shell Script

chgrp 0 /etc/shells