View previous topic :: View next topic |
Author |
Message |
Travers Tux's lil' helper
Joined: 09 Oct 2004 Posts: 142
|
Posted: Tue Apr 05, 2005 10:11 pm Post subject: Are programs run from chroot run as root? |
|
|
So, I have a 32 bit partition on my amd64 system. I want to be able to chroot into it and run X apps. I know how to do this. The question is: will these apps be run as the root user by my native OS? The amd64 gaim is a bit busted for me, and ~x86 works nicely; I don't want to run it as root. |
|
Back to top |
|
|
agent_jdh Veteran
Joined: 08 Aug 2002 Posts: 1783 Location: Scotland
|
Posted: Tue Apr 05, 2005 10:46 pm Post subject: |
|
|
Generally only the super user can do this (according to the chroot info page), so I think you would be stuck running everything in your chroot'ed Gentoo as root. _________________ Jingle Jangle Jewellery |
|
Back to top |
|
|
pablo_supertux Advocate
Joined: 25 Jan 2004 Posts: 2953 Location: Somewhere between reality and Middle-Earth and in Freiburg (Germany)
|
Posted: Tue Apr 05, 2005 11:30 pm Post subject: |
|
|
agent_jdh wrote: | Generally only the super user can do this (according to the chroot info page), so I think you would be stuck running everything in your chroot'ed Gentoo as root. |
only root can run chroot. But if the chroot environment has more users, you are able lo log in as one of them (su - username) and then you run like a normal user _________________ A! Elbereth Gilthoniel!
silivren penna míriel
o menel aglar elenath,
Gilthoniel, A! Elbereth! |
|
Back to top |
|
|
Travers Tux's lil' helper
Joined: 09 Oct 2004 Posts: 142
|
Posted: Wed Apr 06, 2005 3:40 am Post subject: |
|
|
I wound up creating a group 'chroot' of which I put my user in. I used sudo to give chroot privs to the 'chroot' group. Then, I created a user in the chroot (and I made sure it had a distincitve UID.) Finally, I su'ed into the chroot user. Works like a charm. I don't suppose there is an easier, more transparent, way to do this? I mean, I've got scripts and all, but I'd like to have to only run one, rather than run one to get into the choot, and the other to get into my user and launch apps. |
|
Back to top |
|
|
|