[EMAIL PROTECTED] wrote: > Happy Holidays to All! > How can I trap a regular user only to his home dir and NOT able to go to > other vital directories such as /, /etc, /usr, /var, and so on?
A simple way would be to turn their shell into a restricted shell by changing their shell to /bin/rbash. When this happens, barring any bugs in bash itself, the user cannot change directories with the cd command to other than the subtree of her home directory, set or unset the values of the SHELL, PATH, ENV, or BASH_ENV environment variables, or execute any commands specified with a path, among other things. That basically restricts the user to staying in her home directory and executing only commands specified in her PATH environment variable (which you, as root, can control absolutely). Chrooting the user will also work, and is probably more secure, but that's a lot lot more complex to set up. -- While there is a lower class, I am in it, while there is a criminal element, I am of it, and while there is a soul in prison, I am not free. http://stormwyrm.blogspot.com/ _________________________________________________ Philippine Linux Users' Group (PLUG) Mailing List [email protected] (#PLUG @ irc.free.net.ph) Read the Guidelines: http://linux.org.ph/lists Searchable Archives: http://archives.free.net.ph

