CompTIA Linux+ (XK0-005) — Question 298

A Linux administrator is creating a user that can run the FTP service but cannot log in to the system. The administrator sets /bin/false as a log-in shell for the user. When the user tries to run the FTP service, it is rejected with an Invalid shell: /bin/false message. Which of the following is the best way to resolve the issue?

Answer options

Correct answer: B

Explanation

The correct answer is B because adding /bin/false to the /etc/shells file allows the system to recognize it as a valid shell for FTP access. Option A is incorrect since changing ownership does not resolve the shell validation issue. Option C is irrelevant because /bin/false is already an executable file, and option D is inappropriate since changing the shell to /bin/bash contradicts the requirement not to allow user login.