Added a few comments here and there
[linux_from_scratch.git] / newxml / chapter05 / addinguser.xml
bloba16d0a146937e290996edff9061b72dcaf782f32
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3CR2//EN" "http://www.docbook.org/xml/4.3CR2/docbookx.dtd">
3 <sect1 id="ch05-addinguser">
4 <title>Adding the user lfs</title>
5 <?dbhtml filename="addinguser.html"?>
7 <para>When logged in as <emphasis>root</emphasis>, making a single mistake
8 can damage or even wreck your system. Therefore we recommend that you
9 build the packages in this chapter as an unprivileged user. You could
10 of course use your own user name,  but to make it easier to set up a clean
11 work environment we'll create a new user <emphasis>lfs</emphasis> and
12 use this one during the installation process. As <emphasis>root</emphasis>,
13 issue the following commands to add the new user:</para>
15 <screen><userinput>useradd -s /bin/bash -m lfs
16 passwd lfs</userinput></screen>
18 <para>Now grant this new user <emphasis>lfs</emphasis> full access to
19 <filename class="directory">$LFS/tools</filename> by giving it ownership
20 of the directory:</para>
22 <screen><userinput>chown lfs $LFS/tools</userinput></screen>
24 <para>If you made a separate working directory as suggested, give user
25 <emphasis>lfs</emphasis> ownership of this directory too:</para>
27 <screen><userinput>chown lfs $LFS/sources</userinput></screen>
29 <para>Next, login as user <emphasis>lfs</emphasis>. This can be done via a
30 virtual console, through a display manager, or with the following substitute
31 user command:</para>
33 <screen><userinput>su - lfs</userinput></screen>
35 <para>The "<userinput>-</userinput>" instructs <userinput>su</userinput> to
36 start a new, clean shell.</para>
38 </sect1>