Help!

chroot + su + env?

 
  

Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> General Discussions (archive 1) RSS
Next:  douts in linux-2.4.32 kernel comoilation  
Author Message
Angel Tsankov
External


Since: May 04, 2006
Posts: 66



PostPosted: Thu May 04, 2006 8:41 pm    Post subject: chroot + su + env?
Archived from groups: comp>os>linux>misc (more info?)

I need to execute a bash script in a chroot'ed environment and as a different user. I also need to set some of the variables in the
new environment based on values of variables in the current environment. How can I do this?
Back to top
Schraalhans Keukenmeester
External


Since: Apr 25, 2006
Posts: 28



PostPosted: Sat May 06, 2006 11:05 am    Post subject: Re: chroot + su + env? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Angel Tsankov wrote:
> I need to execute a bash script in a chroot'ed environment and as a
> different user. I also need to set some of the variables in the new
> environment based on values of variables in the current environment. How
> can I do this?

Is it NECESSARY the script runs inside the chroot? I.a.w. isn't it
possible the script runs in the current environment and operates on
files in the chroot ? That would deal with the env-var issue as well.

I would personally rather keep bash out of my chroot env.
Sh.

--
A prig is a fellow who is always making you a present of his opinions.
-- George Eliot
Back to top
The Natural Philosopher
External


Since: Jul 09, 2004
Posts: 802



PostPosted: Sat May 06, 2006 12:49 pm    Post subject: Re: chroot + su + env? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Schraalhans Keukenmeester wrote:
> Angel Tsankov wrote:
>> I need to execute a bash script in a chroot'ed environment and as a
>> different user. I also need to set some of the variables in the new
>> environment based on values of variables in the current environment.
>> How can I do this?
>
> Is it NECESSARY the script runs inside the chroot? I.a.w. isn't it
> possible the script runs in the current environment and operates on
> files in the chroot ? That would deal with the env-var issue as well.
>
> I would personally rather keep bash out of my chroot env.
> Sh.
>

Indeed. Bloody sight easier to write half a dozen lines of C and make
that run as root..

Great advantage is the hackers inside your firewall* as well as those
outside won;t be able to break it beyond repair..

* Otherwise known as comp.sci graduautes
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> General Discussions (archive 1) All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum