What creative ways are there to break out of rbash? I don't have permissions to run
restricted: cannot specify `/' in command names
How am I supposed to execute anything without putting '/' in the command line?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
There is a reason you were given a restricted shell. If you were intended to be able to run all commands you would have been given a standard shell.
You should be able to run anything in the PATH you were given without starting the command with /. It is common to exclude commands which can be used to start an unrestricted shell from the path of users with a restricted shell.
EDIT: You have full access to any programs on your path. Some of theses may have commands which provide an unrestricted shell. Editors commonly have shell escape commands. Other commands may provide access to an unrestricted shell When creating a path for a restricted shell verify the capabilities of each command on the path. Giving people the ability to write any files on the path provides an obvious risk.
Restricted shells provide protection to both the system and the user. The system is protected because the user should not have much access to destructive commands. The user is protected damage done to the system using commands not on the path are likely not done by the user. The system manager should be responsible for ensuring the commands on the path do not provide unrestricted shell access.