Security

An administrator creates a contractor account with useradd -m -s /bin/rbash contractor. The contractor logs in and runs several commands with default settings. Which command is rejected by the shell?

Show the answer

Correct answerB. cd /var/log

A restricted bash shell does not allow the cd builtin, so the user cannot change directories. Running ls on an absolute path is tempting, but only command names containing a slash are blocked, not slash-containing arguments, so ls still works.