ghantoos / lshell

lshell is a shell coded in Python, that lets you restrict a user's environment to limited sets of commands, choose to enable/disable any command over SSH (e.g. SCP, SFTP, rsync, etc.), log user's commands, implement timing restriction, and more.
GNU General Public License v3.0
437 stars 112 forks source link

how can i execute a binary file #174

Closed HonkeeChan closed 7 years ago

HonkeeChan commented 7 years ago

i want to execute a binary file like '/usr/bin/file', but i fail. /root:~/bin$ /usr/bin/file *** forbidden command: /usr/bin/file

i think may be a can't execute the binary file, so i can't change the user. because the /etc/shells file set the shell binary path is /usr/bin/lshell, but i can't execute the binary file using /usr/bin/lshell. root:/tmp$ su cgpexpert su: /usr/bin/lshell: Permission denied

my config file

[global] logpath : /var/log/lshell/ 4: log all commands) loglevel : 2

[default] allowed :'all' + ['ll'] allowed_shell_escape : ['man','zcat', 'find', 'vim', 'lshell'] forbidden : [';'] warning_counter : 2 aliases : {'ll':'ls -l', 'ls': 'ls --color=auto'} path : ['/', '/usr/bin', '/*'] allowed_cmd_path: ['/usr/bin'] strict : 0

thank you so much

zaphod77 commented 7 years ago

the entire point of lshell is to stop you from doing that. :)

this is not an issue, as near as i can tell. lshell is working as designed.

ghantoos commented 7 years ago

You should add file to the allowed list of commands.