Вы можете использовать rbash (или bash -r): это ограниченная версия bash, которая накладывает некоторые ограничения на пользователя в отношении полного bash. Из rbash man page:
Он ведет себя одинаково с bash, за исключением того, что следующие запрещены или не выполнены: o changing directories with cd
o setting or unsetting the values of SHELL, PATH, ENV, or BASH_ENV
o specifying command names containing /
o specifying a file name containing a / as an argument to the . builtin command
o Specifying a filename containing a slash as an argument to the -p option to the hash builtin command
o importing function definitions from the shell environment at startup
o parsing the value of SHELLOPTS from the shell environment at startup
o redirecting output using the >, >|, <>, >&, &>, and >> redirection operators
o using the exec builtin command to replace the shell with another command
o adding or deleting builtin commands with the -f and -d options to the enable builtin command
o Using the enable builtin command to enable disabled shell builtins
o specifying the -p option to the command builtin command
o turning off restricted mode with set +r or set +o restricted.
Чтобы использовать rbash trasparently, запустите свой скрипт с #!/bin/rbash.
Надеюсь, что эта помощь.
Я не могу найти ppa для этого пакета, так вот как я это сделаю:
1) Загрузите .deb отсюда: UbuntuUpdates - Пакет «libtomcrypt-dev» [ ! d1]
2) Установите его с помощью sudo dpkg -i /path/to/deb/file, а затем sudo apt-get install -f. См. UbuntuUpdates - Пакет «libtomcrypt-dev» для получения дополнительной информации о том, как установить файлы .deb.