102-500 practice question 25 of 30
On a system using shadowed passwords, the most correct permissions for /etc/passwd are ___ and the most correct permissions for /etc/shadow are _________.
Full set: 233 questionsThe /etc/passwd file contains user account information (but not passwords) and must be readable by all users and processes to map user IDs to usernames. Therefore, permissions of rw-r--r-- (644) are standard. The /etc/shadow file contains sensitive hashed passwords and aging information. To maintain security, it must be protected from all non-privileged users. Making it readable only by the root user, with permissions r-------- (400), is a common and secure configuration that prevents unauthorized access.
A: The permissions for /etc/passwd are too restrictive; many system processes and users need to read this file for UID/username mapping. B: The permissions for /etc/shadow are dangerously insecure, allowing any user on the system to read the hashed passwords. D: The permissions for /etc/passwd are world-writable, and /etc/shadow is world-readable, both of which are severe security vulnerabilities. E: The permissions for /etc/passwd are too restrictive, which would break many system functions that rely on resolving user information.
1. shadow(5) Linux manual page. In the DESCRIPTION section, it states: "The shadow file is readable only by root."
2. Red Hat Enterprise Linux 8 Documentation, "Securing Red Hat Enterprise Linux", Chapter 2, Section 2.1. "The /etc/passwd file should have permissions set to 644... The /etc/shadow file should have permissions set to 000." (Note: 400 is also a common secure practice).
3. Kerrisk, M. (2010). The Linux Programming Interface. No Starch Press. Chapter 9, Section 9.6, p. 181. "The /etc/passwd file is world-readable... The /etc/shadow file... is readable only by root."
Keep practicing
Take the free 102-500 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other 102-500 practice questions
- Question 1What output is produced by the following command sequence? echo ‘1 2 3 4 5 6’ | while rea…
- Question 2Which command will set the local machine's timezone to UTC?
- Question 3Which of the following SQL statements will select the fields name and address from the co…
- Question 4Which of the following commands can remove a user from a group?
- Question 5Where are user specific crontabs stored?
- Question 6Which of the following crontab entries will execute myscript at 30 minutes past every hou…
