rbash man page:
A restricted shell is used to set up an environment more
controlled than the standard shell. It behaves identically
to bash with the exception that the following are disallowed
or not performed:
- changing directories with cd
rbash does not discriminate. It will not allow any
cd, no matter where you're going. Even if it's a subdirectory of the user's home folder.
IMHO in a real-life situation there really isn't a use for rbash. However, there are other things you can do to prevent users from seeing your stuff. For example, you could run:
chmod -R o= $HOME
This changes the permissions of all the files in your home folder (
$HOME) and subdirectories (
-R = recursively), giving other users no permissions (that's what the
o= part means) to access, modify, or even list files within.
Hope this helps.