LFCS practice question 18 of 35
Which character in the password field of /etc/passwd is used to indicate that the encrypted password is stored in /etc/shadow?
Full set: 260 questionsIn modern Linux systems that use a shadow password suite, the encrypted password for a user is not stored in the world-readable /etc/passwd file. Instead, it is stored in the /etc/shadow file, which has much more restrictive permissions. To indicate this, the password field (the second field) in the /etc/passwd file is replaced with a single 'x' character. This 'x' acts as a placeholder, signaling to authentication programs that they must look up the actual password hash in the /etc/shadow file.
A. An asterisk () in the password field typically means the account is locked and no password can be used to log in.
B. A hyphen (-) is not a standard character used in this context for indicating a shadowed password.
C. The character 's' has no standard meaning in the password field of /etc/passwd.
passwd(5) manual page. Under the "DESCRIPTION" section, it describes the fields of the /etc/passwd file. For the password field, it explicitly states: "If the password field contains an 'x' character, the encrypted password is in the /etc/shadow file."
Red Hat Enterprise Linux 9 Documentation, "Configuring and managing identity management," Section 1.1.1 "Local user and group files". It describes the /etc/passwd file format, noting that an "x" in the second field indicates a shadowed password.
The Linux Programming Interface, Michael Kerrisk, Chapter 8, "Users and Groups," Section 8.2, "The Password File: /etc/passwd," page 156. It states, "On all modern Linux systems... this field contains the character x, indicating that the encrypted password is to be found in the /etc/shadow file."
Keep practicing
Take the free LFCS practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other LFCS practice questions
- Question 1Which of the following commands should be added to /etc/bash_profile in order to change t…
- Question 2Which of the following commands reboots the system when using SysV init? (Choose TWO corr…
- Question 3Which of the following tasks can be accomplished using the command date? (Choose TWO corr…
- Question 4Which of the following environment variables overrides or extends the list of directories…
- Question 5Which of the following are syslog facilities? (Choose TWO correct answers.)
- Question 6Which of the following programs uses the hosts.allow file to perform its main task of che…
