>Привет
>Хочу чтоб у меня restricted bash (bash -r) запускался с предустановленной переменно
>PATH=/usr/local/restricted
>В этот каталог я запхну все что юзеру надо :)
man bash:
...
RESTRICTED SHELL
...
It behaves identically to bash with the exception that the following are
disallowed or not performed:
...
setting or unsetting the values of SHELL, PATH, ENV, or BASH_ENV
...
These restrictions are enforced after any startup files are read.
...
[root@rhel-ns1 root]# echo $PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin
[root@rhel-ns1 root]# bash --restricted
[root@rhel-ns1 root]# echo $PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin
[root@rhel-ns1 root]# PATH=$PATH:/tmp
bash: PATH: readonly variable
[root@rhel-ns1 root]# exit
exit
[root@rhel-ns1 root]# PATH=$PATH:/tmp
[root@rhel-ns1 root]# bash --restricted
[root@rhel-ns1 root]# echo $PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin:/tmp
[root@rhel-ns1 root]#
P.S. Vidod o4eviden.