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
434 stars 113 forks source link

Crach on command #200

Closed pablfr closed 5 years ago

pablfr commented 5 years ago

Hi, Overall it works very well, great work!

My config fil withou comment :

Id: lshell.conf,v 1.27 2010-10-18 19:05:17 ghantoos Exp [global] logpath : /var/log/lshell/ loglevel : 2 allowed : ['ls', 'echo','ll'] forbidden : [';', '&', '|','','>','<', '$(', '${'] warning_counter : -1 aliases : {'ll':'ls -l'} strict : 0 [testuser] allowed : ['cat','ping','cd', 'vi', 'vim','nano','mkdir','pwd'] - 'all' path : ['/var/www', '/home', '/var/log','tmp'] - ['/usr/local', '/var/lib'] home_path : '/var/www'`

Any an idea ?

testuser:~$ pwd Traceback (most recent call last): File "/usr/bin/lshell", line 52, in <module> main() File "/usr/bin/lshell", line 42, in main cli.cmdloop() File "/usr/local/lib/python2.7/dist-packages/lshell/shellcmd.py", line 267, in cmdloop stop = self.onecmd(line) File "/usr/local/lib/python2.7/dist-packages/lshell/shellcmd.py", line 410, in onecmd func = getattr(self, 'do_' + cmd) File "/usr/local/lib/python2.7/dist-packages/lshell/shellcmd.py", line 115, in __getattr__ strict=self.conf['strict']) File "/usr/local/lib/python2.7/dist-packages/lshell/sec.py", line 308, in check_secure ssh=ssh) File "/usr/local/lib/python2.7/dist-packages/lshell/sec.py", line 54, in warn_count % (messagetype, command)) TypeError: not all arguments converted during string formatting Connection to 127.0.0.1 closed.

OS : Ubuntu 16.04.4 LTS (GNU/Linux 4.4.0-133-generic x86_64)

Thanks Pablo