On Tue, 14 Jul 2020 at 00:57, Daniel Schepler via lfs-dev <lfs-dev@lists.linuxfromscratch.org> wrote: > > On Mon, Jul 13, 2020 at 7:56 AM Bruce Dubbs via lfs-dev > > > Sure, that could be done, but why? There are a lot of ways to > > accomplish the same task, but I don't see the advantage of one way over > > the other. > > Well, it does demonstrate the principle of minimal privilege. (Though > to be fair, it is perhaps questionable whether creating the base > hierarchy and then doing a chown as root is a good use of this > principle.)
That, doing less as root on the host, was kind of where I had been going. Implant, in the mind of the new user, just how little actually needs to be done as root on a GNU/Linux system. > Incidentally, along similar lines - the last time I did an LFS build, > I experimented with creating minimal sulfs and sudolfs utilities as > either the last step before entering the chroot or the first step > after entering the chroot (forgot which). These were minimal > hard-coded programs compiled from about 20 to 30 lines of C code, > where sulfs simulated the effects of "su - lfs" and sudolfs simulated > the effects of sudo configured to only allow user lfs to sudo. Hmm, that might be an interesting approach to take for a "PkgUser" build, now that some packages deployed within the early chapters are installed into their final locations, as oppsoed to /tools, and so would be owned by the lfs user. -- http://lists.linuxfromscratch.org/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page