GSEC · Question #357
The /cat/etc/passwd file on a client computer contains the following entry: Martha:x:::::bin/false Which of the following is true for Martha?
The correct answer is D. Martha has been denied access on the computer. In Linux, assigning /bin/false as a user's shell in /etc/passwd immediately terminates any login attempt, denying the user all interactive access to the system.
Question
The /cat/etc/passwd file on a client computer contains the following entry: Martha:x:::::bin/false Which of the following is true for Martha?
Options
- AMartha's password is x.
- BMartha has full access on the computer.
- CMartha has limited access on the computer.
- DMartha has been denied access on the computer.
How the community answered
(72 responses)- A8% (6)
- B4% (3)
- C14% (10)
- D74% (53)
Why each option
In Linux, assigning /bin/false as a user's shell in /etc/passwd immediately terminates any login attempt, denying the user all interactive access to the system.
The 'x' in the second field is a placeholder indicating the actual password hash is stored in /etc/shadow, not that the literal password is the character 'x'.
Full access would require a valid interactive shell and appropriate group permissions; /bin/false as the shell blocks login entirely before any access can be granted.
Limited access implies the user can log in but with reduced privileges; /bin/false prevents the login session from ever being established, which is denial rather than restriction.
The seventh colon-delimited field in /etc/passwd specifies the user's login shell. When set to /bin/false, every login attempt exits immediately with a failure status code, preventing Martha from establishing any session on the system. This technique is commonly used for service or system accounts that must exist in the user database but should never be used for direct interactive logins.
Concept tested: Linux /etc/passwd shell field and login denial
Source: https://man7.org/linux/man-pages/man5/passwd.5.html
Topics
Community Discussion
No community discussion yet for this question.