Linux_FoundationLinux_Foundation
LFCS · Question #265
LFCS Question #265: Real Exam Question with Answer & Explanation
The correct answer is A: /etc/passwd: -rw-r--r-- /etc/shadow: -r--------. File permissions for /etc/passwd allow all users to read basic account information, while /etc/shadow is restricted to root-only read access to protect password hashes.
Submitted by carlos_mx· Apr 18, 2026User and Group Management
Question
Which of the following should the permission settings be for /etc/passwd and /etc/shadow?
Options
- A/etc/passwd: -rw-r--r-- /etc/shadow: -r--------
- B/etc/passwd: -r-------- /etc/shadow: -rw-r--r--
- C/etc/passwd: -rw-r--r-- /etc/shadow: -rw-r--r--
- D/etc/passwd: -r-------- /etc/shadow: -r--------}
Explanation
File permissions for /etc/passwd allow all users to read basic account information, while /etc/shadow is restricted to root-only read access to protect password hashes.
Common mistakes.
- B. This option incorrectly restricts /etc/passwd to root-only read, which breaks common system functionality, and grants too much read/write access to /etc/shadow.
- C. This option grants read and write access to /etc/shadow to all users, which is a severe security vulnerability.
- D. This option restricts /etc/passwd to root-only read, which would prevent many services and users from functioning correctly, and provides correct but incomplete permissions for shadow.
Concept tested. /etc/passwd and /etc/shadow permissions
Reference. https://man7.org/linux/man-pages/man5/passwd.5.html
Topics
#File permissions#/etc/passwd#/etc/shadow#Security
Community Discussion
No community discussion yet for this question.