When logged in as user root,
making a single mistake can damage or destroy a system. Therefore, we
recommend building the packages as an unprivileged user.
You could use your own user name, but to make it easier to set up a clean
work environment, create a new user called clfs as a member of a new group (also named
clfs) and use this user during
the installation process. As root,
issue the following commands to add the new user:
groupadd clfs useradd -s /bin/bash -g clfs -d /home/clfs clfs mkdir -pv /home/clfs chown -v clfs:clfs /home/clfs
The meaning of the command line options:
-s /bin/bashThis makes bash the default shell for
user clfs.
-g clfsThis option adds user clfs
to group clfs.
clfsThis is the actual name for the created group and user.
To log in as clfs (as
opposed to switching to user clfs
when logged in as root, which
does not require the clfs user
to have a password), give clfs
a password:
passwd clfs
Grant clfs full access to
${CLFS}/cross-tools and
${CLFS}/tools by making clfs the directorys' owner:
chown -v clfs ${CLFS}/tools
chown -v clfs ${CLFS}/cross-toolsIf a separate working directory was created as suggested,
give user clfs ownership of this directory:
chown -v clfs ${CLFS}/sourcesNext, login as user clfs.
This can be done via a virtual console, through a display manager, or
with the following substitute user command:
su - clfs
The “-” instructs
su to start a login shell as opposed to a non-login
shell. The difference between these two types of shells can be found
in detail in bash(1) and info
bash.