nerdexam
CompTIACompTIA

XK0-005 · Question #1738

XK0-005 Question #1738: Real Exam Question with Answer & Explanation

The correct answer is B: Add /bin/false entry to the /etc/shells file. The /etc/shells file contains a list of valid login shells. Since /bin/false is not listed as a valid shell, adding it to the /etc/shells file will resolve the issue and allow the user to run the FTP service without being able to log into the system interactively.

System Management

Question

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 login 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?

Options

  • AChange ownership of /bin/false to the FTP user
  • BAdd /bin/false entry to the /etc/shells file
  • CMake /bin/false an executable file
  • DChange the user's default shell to /bin/bash

Explanation

The /etc/shells file contains a list of valid login shells. Since /bin/false is not listed as a valid shell, adding it to the /etc/shells file will resolve the issue and allow the user to run the FTP service without being able to log into the system interactively.

Topics

#User management#Linux shells#/etc/shells#FTP service configuration

Community Discussion

No community discussion yet for this question.

Full XK0-005 PracticeBrowse All XK0-005 Questions