An intern needs read-only SSH access to the /srv/docs directory on a development server. The security policy requires that, after login, the account must not be able to change directories, modify the PATH variable, redirect output, or execute any command whose name contains a slash. Which login shell should the administrator assign to the intern's account in /etc/passwd to meet these requirements while still allowing the intern to obtain an interactive prompt?
Invoking Bash as rbash starts it in restricted-shell mode. In this mode the built-in cd is disabled, environment variables such as PATH cannot be changed, command names may not contain a slash, and output-redirection operators are blocked. These built-in restrictions give the intern the limited interactive environment the policy demands. Setting the shell to /sbin/nologin or /bin/false would prevent any login at all, while an ordinary /bin/bash session would allow all of the prohibited actions.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the purpose of the rbash login shell?
Open an interactive chat with Bash
How does /sbin/nologin differ from rbash?
Open an interactive chat with Bash
What files must be modified to assign a login shell like rbash to a user?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
Security
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access