1829638 Members
1737 Online
109992 Solutions
New Discussion

Restricting Access

 
Anthony_69
Occasional Contributor

Restricting Access

Hi all....
this is my first post here so please ignore me if i'm being a bit thick!
I was just wondering if when setting up a new user, is it possible to restrict access for that user to just one directory. eg: when this user logs in, it takes them directly to /tmp and they are not allowed to move from that directory? Thanks in advance.....
3 REPLIES 3
Kjartan Maraas
Valued Contributor

Re: Restricting Access

I think you want to look into doing a chroot jail for the user maybe? There's a description of setting up apache in this manner at:

http://en.tldp.org/LDP/solrhe/Securing-Optimizing-Linux-RH-Edition-v1.3/chap29sec254.html

HTH
Leovino A. Trinidad, Jr
Frequent Advisor

Re: Restricting Access

Hi! I think there are two things you have to do here. First, to make user to go directly to tmp directory when logging in... use "useradd" command with -b (default directory)ex. useradd john -d /tmp or you if the user is already created use "uermod" command with -d option, ex. usermod -d /tmp john. Second is, to restrict users from going to other directories use the sudo command. Here you can restrict the user from using shell commands and one of which is the "cd", see "man sudo" or go to your search engine e.i. google.com and type sudo setup.

Hope this helps you.

Regards,

LAT
Leovino A. Trinidad, Jr
Frequent Advisor

Re: Restricting Access

Hi! I think there are two things you have to do here. First, to make user to go directly to tmp directory when logging in... use "useradd" command with -d (default directory)ex. useradd john -d /tmp or you if the user is already created use "usermod" command with -d option, ex. usermod -d /tmp john. Second is, to restrict users from going to other directories use the sudo command. Here you can restrict the user from using shell commands such as the "cd", see "man sudo" or go to your search engine e.i. google.com and type sudo setup.

Hope this helps you.

Regards,

LAT