LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (http://www.linuxquestions.org/questions/linux-security-4/)
-   -   chroot (http://www.linuxquestions.org/questions/linux-security-4/chroot-205038/)

wrongman 07-14-2004 03:33 PM

chroot
 
how can i chroot a program, and let it run with normal user permissions?
i've set up the jail, the program is 'bitchx', i installed also the program 'id' in the jail, and when i run chroot etcetc id, i see 0 (i'm root), but if i try to run chroot as normal user it says that i don't have permissions... so how can i do this? i've to install 'su' in the jail and then do 'su normaluser -c command'? isn't having 'su' inside the jail a security risk?

jschiwal 07-14-2004 03:48 PM

If your su binary depends on PAM, you may need to recompile a new su to use instead in the jail.
http://tjw.org/etded/su.php

This chroot jail howto is not exactly what you are doing but may give some ideas.
http://www.tjw.org/chroot-login-HOWTO/

wrongman 07-15-2004 02:35 AM

i resolved in another way :) i discovered a tool called chrootuid that change the root dir and change also the user uid, so you don't need to include su in the jail :)


All times are GMT -5. The time now is 09:48 PM.