Alan Feuerbacher wrote:
In various places the LFS and BLFS books state that it's generally
recommended to compile packages as an unprivileged user, then become the
root user when installing the software (e.g. BLFS book, ch. 2, Notes on
Building Software). When switching to root, should this be done with a
login shell or non-login shell? I.e.:
su root
or
su - root (or su --login root)
Further on in BLFS, "sudo" is installed, so I suppose that would be
appropriate to use.
It's easier to use a subshell 'su' and not a login shell 'su -'. The
obvious reason is that 'su -' will take you to /root and you will have to
change the current directory back to the build directory.
For building many packages, it is much easier to use sudo with the build
user set with NOPASSWD: or setting the variable passwd_timeout in the
sudoers file to a longer value, say 240 for 4 hours.
Neither should be used in a production system.
-- Bruce
--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page