ubuntu restricted shell with lshell

lshell is a restricted shell, similar to rssh or ironbars, which you can use to restrict users shell. but rssh only allow scp/sftp and does not allow login to shell. lshell allow login, but restrict user to only few commands.
i tested this with my ubuntu perfect webserver setup. but i believe it's same steps to install on any linux.
wget http://downloads.sourceforge.net/project/lshell/lshell/0.9.5/lshell-0.9.5.tar.gz
tar xvfz lshell-0.9.5.tar.gz
sudo python setup.py install
chsh -s /usr/bin/lshell RESTRICTEDUSERNAME

o, btw. it python script. so make sure python is installed.
that's it.
simple, fast, easy.

after that, edit /etc/lshell.conf to configure lshell to suite your need.
the most important (for me) is the allowed and forbidden list of commands.

--
tips & tricks on computers and gadgets
denny on IT ; let's doIT
documenting the brain

Comments

A Name to Comment said…
lshell is available as a package in Ubuntu.  The correct way to install would be via "sudo apt-get install lshell".