jhalfs: why su - (user)

George Boudreau georgeb at linuxfromscratch.org
Fri Aug 4 17:11:06 PDT 2006


Dan Nicholson wrote:
> On 8/4/06, George Boudreau <georgeb at linuxfromscratch.org> wrote:
>>
>>    I was also looking to mimic the book's use of the user account, enter
>> the account once and build the temporary tools and leave. The idea of
>> switching in and out of a command shell a few hundred times is irksome
>> but I will live with it.
> 
> Here's a thought that spawned in my mind from gsbuild. You could
> implement a target that switches user to run make again for only the
> unprivileged parts.  Something like this:
> 
> temp-tools: chapter02 chapter03 chapter04
>    su - $(LUSER) "make chapter05"
> 
> Then you could just lower privelages once and the build would return
> after that to the privileged user. There'd probably be some more
> thinking about how make would have to be invoked, but that's the idea.
> 
   This is the stuff that gets into the experimental branch and either 
lives or dies.
   Look at how I do CLFS build with a minimal boot. It is a 2 phase 
process that dies after the boot phase build is complete and you then 
have to specify the 2nd phase once you boot the partition. (although 
there is nothing to stop you from trying the 2nd phase on your host 
system.. it would be ugly).
   I may try something later in the week/month.

> -- 
> Dan




More information about the alfs-discuss mailing list