CompTIA Linux+ (XK0-004) — Question 86
Joe, a user, is unable to log in to the server and contracts the systems administrator to look into the issue. The administrator examines the /etc/passwd file and discovers the following entry: joe:x:505:505::/home/joe:/bin/false
Which of the following commands should the administrator execute to resolve the problem?
Answer options
- A. usermod ג€"s /bin/bash joe
- B. passwd ג€"u joe
- C. useradd ג€"s /bin/bash joe
- D. chage ג€"E -l joe
Correct answer: A
Explanation
The correct command is A, as it changes Joe's shell from /bin/false to /bin/bash, allowing him to log in. Option B only unlocks a user account that may be locked, which isn't the issue here. Option C would create a new user instead of modifying the existing one, and option D doesn't address the shell issue at all.