Jan 07
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: