jhalfs: why su - (user)

Dan Nicholson dbn.lists at gmail.com
Fri Aug 4 16:56:44 PDT 2006


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.

--
Dan



More information about the alfs-discuss mailing list