Skip to content

7.1.9 Ensure permissions on /etc/shells are configured

Audit#

Run the following command to verify /etc/shells is mode 640 or more restrictive, Uid is 0/root and Gid is 0/root:

# stat -Lc 'Access: (%#a/%A) Uid: ( %u/ %U) Gid: ( %g/ %G)' /etc/shells
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)

Remediation#

Run the following commands to remove excess permissions, set owner, and set group on /etc/shells:

# chmod u-x,go-wx /etc/shells
# chown root:root /etc/shells

Default Value: Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)