nixre.net
== rbash ==

source: https://www.nextstep4it.com/rbash-restricted-shell-in-linux/

rbash is not an own package - you can start a
restricted bash shell by calling bash with the
-r option, or by calling rbash,
which is a simple symlink on bash only named
rbash.


# ln -s /bin/bash /bin/rbash


if rbash is not present on your system.

By default in rbash the following actions aren't allowed:



It is possible to do more restrictions
by setting up an environment with only as
much allowed commands as needed - for example
by something similar to the following:


# chsh -s /bin/rbash <username>
# mkdir /home/<username>/bin
# cd /home/<username>/bin && ln -s `which mutt nano` ./


$HOME/.bash_profile with

if [[ -f $HOME/.bashrc ]]; then
  . $HOME/.bashrc
fi


and $HOME/.bashrc with

export PATH=$HOME/bin


and finally

# chattr +i /home/$USER/{.bash_profile,.bashrc}