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.
Updating to say that this is still and issue. Has anyone else experienced this?
I am using lshell v 0.9.15.1-1. When adding aliases to lshell.conf I receive an error message. I have tried different aliases always adding the command to the allowed list. Currently I only have ll set as an alias.
Traceback (most recent call last):
File "/usr/bin/lshell", line 27, in ?
lshell.main()
File "/usr/lib/python2.4/site-packages/lshell.py", line 1450, in main
cli.cmdloop()
File "/usr/lib/python2.4/site-packages/lshell.py", line 556, in cmdloop
stop = self.onecmd(line)
File "/usr/lib/python2.4/site-packages/lshell.py", line 678, in onecmd
func = getattr(self, 'do_' + cmd)
File "/usr/lib/python2.4/site-packages/lshell.py", line 163, in getattr
self.g_line = get_aliases(self.g_line, self.conf['aliases'])
File "/usr/lib/python2.4/site-packages/lshell.py", line 1425, in get_aliases
line = re.sub(reg2, "%s%s%s" % (before, aliaskey, \
UnboundLocalError: local variable 'aliaskey' referenced before assignment
Updating to say that this is still and issue. Has anyone else experienced this?
I am using lshell v 0.9.15.1-1. When adding aliases to lshell.conf I receive an error message. I have tried different aliases always adding the command to the allowed list. Currently I only have ll set as an alias.
RHEL 5.9 python-2.4.3-56.el5
lshell.conf file
allowed : ['sudo','sudoedit','passwd','mkdir','rmdir','ls','ll','cd','pwd','less','grep','tar','gzip']
aliases : {'ll':'ls -l'}
executed command
ll
Error message
Traceback (most recent call last): File "/usr/bin/lshell", line 27, in ? lshell.main() File "/usr/lib/python2.4/site-packages/lshell.py", line 1450, in main cli.cmdloop() File "/usr/lib/python2.4/site-packages/lshell.py", line 556, in cmdloop stop = self.onecmd(line) File "/usr/lib/python2.4/site-packages/lshell.py", line 678, in onecmd func = getattr(self, 'do_' + cmd) File "/usr/lib/python2.4/site-packages/lshell.py", line 163, in getattr self.g_line = get_aliases(self.g_line, self.conf['aliases']) File "/usr/lib/python2.4/site-packages/lshell.py", line 1425, in get_aliases line = re.sub(reg2, "%s%s%s" % (before, aliaskey, \ UnboundLocalError: local variable 'aliaskey' referenced before assignment