Changes

Jump to navigation Jump to search
Created page with "If you use SSH Logins you can lock down the Console to a restriced shell with less enabled commands! * Login as root User on the Server * install rbash with: <pre> apt-get in..."
If you use SSH Logins you can lock down the Console to a restriced shell with less enabled commands!

* Login as root User on the Server
* install rbash with:
<pre>
apt-get install rbash
</pre>
* rename bash by:
<pre>
mv /bin/bash /bin/oldbash
chmod o= /bin/oldbash
</pre>
* create a symlink for rbash to bash
<pre>
$ln -s /bin/bash /bin/rbash
</pre>
3. enable rbash by system setting /etc/shells
<pre>
$echo '/bin/rbash' >> /etc/shells
</pre>
4. set user shell to /bin/rbash
<pre>
$chsh #set user shell to /bin/rbash
</pre>
5. Disable "chsh" command for users
<pre>
$chmod o= /bin/chsh
</pre>
6. Login as user and test linux commands..

Navigation menu