adding-user.xml 1.3 KB

12345678910111213141516171819202122232425262728293031
  1. <sect1 id="ch05-addinguser">
  2. <title>Adding the user lfs</title>
  3. <?dbhtml filename="addinguser.html" dir="chapter05"?>
  4. <para>When logged in as <emphasis>root</emphasis>, making a single mistake
  5. can damage or even wreck your system. Therefore we recommend that you
  6. build the packages in this chapter as an unprivileged user. You could
  7. of course use your own user name, but to make it easier to set up a clean
  8. work environment we'll create a new user <emphasis>lfs</emphasis> and
  9. use this one during the installation process. As <emphasis>root</emphasis>,
  10. issue the following commands to add the new user:</para>
  11. <para><screen><userinput>useradd -s /bin/bash -m lfs
  12. passwd lfs</userinput></screen></para>
  13. <para>Now grant this new user <emphasis>lfs</emphasis> full access to
  14. <filename class="directory">$LFS/stage1</filename> by giving it ownership
  15. of the directory:</para>
  16. <para><screen><userinput>chown lfs $LFS/stage1</userinput></screen></para>
  17. <para>Next, login as user <emphasis>lfs</emphasis>. This can be done via a
  18. virtual console, through a display manager, or with the following substitute
  19. user command:</para>
  20. <para><screen><userinput>su - lfs</userinput></screen></para>
  21. <para>The "<userinput>-</userinput>" instructs <userinput>su</userinput> to
  22. start a new, clean shell.</para>
  23. </sect1>