Other Articles

Servers – Configure Shadow Permissions

Support > Fixing Checks > Server

06 March, 2026

This check ensures that the permissions on the /etc/shadow file are configured securely. The /etc/shadow file stores sensitive information about user accounts, including hashed passwords and other authentication-related data.

Proper ownership and restrictive permissions help prevent unauthorized users from accessing or modifying this sensitive data, reducing the risk of password cracking or account compromise.

Check Details

  • Resource: Server
  • Check: Configure Shadow Permissions
  • Risk: If the /etc/shadow file has incorrect ownership or permissions, attackers may gain access to hashed passwords and other sensitive account data. This can allow them to run password cracking attacks or exploit account security settings.

Remediation Steps

  1. Open a terminal session on the server with root or sudo privileges.
  2. Verify the current ownership and permissions of the /etc/shadow file.

    stat /etc/shadow
    
  3. Ensure that the file ownership is set to root:root or root:shadow as required by the system configuration.

    sudo chown root:root /etc/shadow
    
    sudo chown root:shadow /etc/shadow
    
  4. Set the correct permissions to restrict access to authorized users only.

    sudo chmod o-rwx,g-wx /etc/shadow
    
  5. Verify that the final configuration matches the following requirements:

    • Owner: root
    • Group: root or shadow
    • Permissions: 640 or more restrictive (-rw-r-----)