![Forrest logo](/images/logo.png)
rbash:tldr:d6114
The command "rbash -s" is used to launch an interactive shell with restricted features and capabilities.
The "rbash" stands for restricted bash, which is a modified version of the Bash shell. It provides a limited environment for executing commands, often used for creating restricted user accounts with limited access to the system.
The "-s" option is used to run an interactive shell after processing any startup files. This means that the user will be provided with a command prompt and can execute commands in the restricted environment. Without the "-s" option, rbash would just print an error message and exit.
When running rbash, several features and capabilities of the Bash shell are restricted or disabled. Some of the common restrictions include:
- Disabling the use of certain commands or programs.
- Preventing changes to the user's PATH environment variable.
- Restricting the use of redirection and pipes.
- Disallowing the execution of scripts or commands with slashes in them.
These restrictions are intended to limit the user's ability to perform certain actions or access specific resources on the system. The rbash command is often used for security purposes, as it reduces the risk of unintended or unauthorized actions by restricting the user's capabilities within the restricted environment.