【L-shell】Linux 系统下 限制用户的活动目录,控制用户使用命令的权限
时间:2015-01-17 17:30 来源:linux.it.net.cn 作者:IT
lshell.noarch : Python-based limited Shell
yum install lshell
configure file: /etc/lshell.conf
============================================
aliases : {'ls':'ls -l', 'cd':'cd /home'}
allowed : ['grep','cd','cp','sed','ls','pwd'] ####允许使用的命令 ###
forbidden : [';', '&', '|','`','>','<', '$(', '${'] ######设置非法字符##
home_path : '/home/' ####设置用户的家目录###
path : ['/home/a/b/] ####限制用户的目录####
=============================================
对账号使用:
# cat /etc/passwd |grep lsh
TEST:x:59573:59573::/home/TEST:/usr/bin/lshell
(责任编辑:IT)
lshell.noarch : Python-based limited Shell yum install lshell
configure file: /etc/lshell.conf
aliases : {'ls':'ls -l', 'cd':'cd /home'}
============================================= |