Skip to content

7.1.1 Ensure permissions on /etc/passwd are configured

Audit#

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

# stat -Lc 'Access: (%#a/%A) Uid: ( %u/ %U) Gid: ( %g/ %G)' /etc/passwd
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/passwd:

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

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