Restricting Shell Users to their Home Directory

, Add comments

The “easiest way” to lock down users to their home directory is to switch their shell account to rbash (restricted bash).  The rbash shell behaves like the bash shell, but some functions are disallowed e.g. change directory with cd.

For more information refer to the man pages for rbash.

$ man rbash

To change the user’s shell modify the file /etc/passwd

$ nano /etc/passwd

and replace /bin/bash with /bin/rbash e.g.

guest:x:100:100::/home/guest:/bin/rbash

Related posts:

  1. Restricting Shell for only SCP/SFTP
  2. Samba on Ubuntu Quickstart Guide
  3. Apache HTTP Authentication
  4. Building a Server at Home
  5. Tomcat 5.5 for Ubuntu Quickstart Guide

Comments are closed.

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in