Adding the user lfs
If you are logged in as root during Chapter 5,
your host system can be damaged by a single mistake. We recommend that
you build the packages in Chapter 5 as an unprivileged user. You could use
your own user name, but to ensure a clean build environment, we'll create a
new user: lfs. As root, issue
the following commands to add the new user:
useradd -s /bin/bash -m lfs
passwd lfs
In order to grant ownership of the $LFS/static
directory to the user lfs, issue the command:
chown lfs $LFS/static
Next, login as user lfs. This can be accomplished
via a virtual console, display manager or with the substitute user
command:
su - lfs
The "-" instructs su to
start a new, clean shell.