限制用户执行的命令

http://blog.csdn.net/nosodeep/article/details/8549331

http://os.51cto.com/art/201703/534895.htm

http://kuanghy.github.io/2017/02/20/rbash

https://wenku.baidu.com/view/90a161e8e009581b6bd9ebed.html

[root@bao-work-4 ~]# ln -s /bin/bash /bin/rbash
[root@bao-work-4 ~]# useradd -s /bin/rbash bigbao [root@bao-work-4 ~]# chown -R root:bigbao /home/bigbao/.bashrc /home/bigbao/.bash_profile [root@bao-work-4 ~]# chmod 640 /home/bigbao/.bashrc /home/bigbao/.bash_profile [root@bao-work-4 ~]# mkdir /home/bigbao/bin [root@bao-work-4 ~]# echo "export PATH=/home/bigbao/bin" >> /home/bigbao/.bash_profile [root@bao-work-4 ~]# ln -s /usr/bin/ssh /home/bigbao/bin/ssh [root@bao-work-4 ~]# passwd bigbao

 

posted @ 2017-05-09 15:59  BigBao的博客  阅读(322)  评论(0编辑  收藏  举报