nerdexam
Linux_FoundationLinux_Foundation

LFCS · Question #445

LFCS Question #445: Real Exam Question with Answer & Explanation

The correct answer is C: -rw-r--r--, -r--------. For shadowed passwords, /etc/passwd must be world-readable (-rw-r--r--) for system processes, while /etc/shadow must be readable only by root (-r--------) to protect sensitive password hashes.

Submitted by yasin.bd· Apr 18, 2026User and Group Management

Question

On a system using shadowed passwords, the correct permissions for /etc/passwd are ___ and the correct permissions for /etc/shadow are ___.

Options

  • A-rw-r-----, -r--------
  • B-rw-r--r--, -r--r--r--
  • C-rw-r--r--, -r--------
  • D-rw-r--rw-, -r-----r--
  • E-rw-------, -r--------

Explanation

For shadowed passwords, /etc/passwd must be world-readable (-rw-r--r--) for system processes, while /etc/shadow must be readable only by root (-r--------) to protect sensitive password hashes.

Common mistakes.

  • A. The permissions -rw-r----- for /etc/passwd restrict read access for 'others', which can cause issues for programs needing to map UIDs to usernames.
  • B. The permissions -r--r--r-- for /etc/shadow make the password hashes world-readable, posing a severe security risk.
  • D. The permissions -rw-r--rw- for /etc/passwd allow 'others' to write to the file, which is a significant security vulnerability, and -r-----r-- for /etc/shadow still allows 'others' to read it.
  • E. The permissions -rw------- for /etc/passwd restrict read access to only the owner (root), which can break system functionality requiring user lookup.

Concept tested. Linux password file permissions

Reference. https://man7.org/linux/man-pages/man5/shadow.5.html

Topics

#File Permissions#User Accounts#System Security#Shadow Passwords

Community Discussion

No community discussion yet for this question.

Full LFCS PracticeBrowse All LFCS Questions