LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   lock new user into home dir (https://www.linuxquestions.org/questions/linux-security-4/lock-new-user-into-home-dir-335132/)

eyewittness 06-19-2005 09:27 AM

lock new user into home dir
 
Hi people,

Does someone know if its possible to create a user on redhat to lock that user in there homedirectory so its not possible to brows out of the home folder....

stefan_nicolau 06-19-2005 10:02 AM

It is not really possible to do anything useful with this, as the user will not be able to run any program. Not even ls or bash. Why want to do this? If you really want it, you must copy a shell to the user's home directory then chroot to it. You may need other files in the home, and I am not sure how to do the chrooting, as only root can chroot.

eyewittness 06-19-2005 11:10 AM

cause i want to put a gameserver in his home and only give acces to a text editor and some build commands... are there other options to do it?

RandomLinuxNewb 06-19-2005 11:42 AM

Look into either chroot or usermode linux. Chroot will require you to make a copy of your directory layout inside this users home direcotry. EVERYTHING that this user is going to need is going to have to be inside his directory. This includes copies of /etc, /bin, /proc, etc. So you will need to do some research into what each program is going to need access to.

The other option is to use usermode linux which lets you install a second copy of linux that is independent of the host, give the user access to that and he has his own "machine" that he can do what ever he want's with.

stefan_nicolau 06-19-2005 12:33 PM

Quote:

cause i want to put a gameserver in his home and only give acces to a text editor and some build commands... are there other options to do it?
Wouldn't the right file permissions achieve the same result with a lot less trouble?


All times are GMT -5. The time now is 11:00 AM.