nerdexam
Linux_Foundation

LFCS · Question #764

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

The correct answer is C. rwrr, r. For security, /etc/passwd needs to be readable by all users but only writable by root, while /etc/shadow must be readable and writable only by root.

Submitted by dimitri_ru· 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

  • Arwr, r
  • Brwrr, rrr
  • Crwrr, r
  • Drwrrw,rr
  • Erw, r

How the community answered

(26 responses)
  • A
    8% (2)
  • B
    4% (1)
  • C
    88% (23)

Why each option

For security, `/etc/passwd` needs to be readable by all users but only writable by root, while `/etc/shadow` must be readable and writable only by root.

Arwr, r

`rwr` (624) for `/etc/passwd` incorrectly grants group write permissions, and `r` (400) for `/etc/shadow` only allows root to read, not write.

Brwrr, rrr

`rrr` (444) for `/etc/shadow` incorrectly grants read permissions to all, compromising password security.

Crwrr, rCorrect

The correct permissions for `/etc/passwd` are `rw-r--r--` (644), allowing all users to read it for essential user information but only root to modify. The correct permissions for `/etc/shadow` are `r--------` (400), ensuring only the root user can read and write the hashed passwords, maintaining security.

Drwrrw,rr

`rwrrw` (666) for `/etc/passwd` incorrectly grants write permissions to all, a severe security flaw, and `rr` (440) for `/etc/shadow` incorrectly grants read permission to the group.

Erw, r

`rw` (600) for `/etc/passwd` incorrectly restricts read access for other users, hindering normal system operations.

Concept tested: File permissions for /etc/passwd and /etc/shadow

Source: https://docs.oracle.com/cd/E37670_01/E37671/html/ol_passwd.html

Topics

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

Community Discussion

No community discussion yet for this question.

Full LFCS Practice