diff options
author | Matthew Burgess <matthew@linuxfromscratch.org> | 2004-05-03 10:59:46 +0000 |
---|---|---|
committer | Matthew Burgess <matthew@linuxfromscratch.org> | 2004-05-03 10:59:46 +0000 |
commit | 673b0d84ba9591e07c0bdf0ee49d92eba10f502c (patch) | |
tree | 129e27a1450727b440da4378e0117a468eb9c25e /chapter04/addinguser.xml | |
parent | 287ea55da70ceb1f0990554b7db921d525fef816 (diff) |
* Merged newxml into HEAD
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3435 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter04/addinguser.xml')
-rw-r--r-- | chapter04/addinguser.xml | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/chapter04/addinguser.xml b/chapter04/addinguser.xml new file mode 100644 index 000000000..5763b04c5 --- /dev/null +++ b/chapter04/addinguser.xml @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> +<sect1 id="ch-tools-addinguser"> +<title>Adding the user lfs</title> +<?dbhtml filename="addinguser.html"?> + +<para>When logged in as <emphasis>root</emphasis>, making a single mistake +can damage or even wreck your system. Therefore we recommend that you +build the packages in this chapter as an unprivileged user. You could +of course use your own user name, but to make it easier to set up a clean +work environment we'll create a new user <emphasis>lfs</emphasis> and +use this one during the installation process. As <emphasis>root</emphasis>, +issue the following command to add the new user:</para> + +<screen><userinput>useradd -s /bin/bash -m -k /dev/null lfs</userinput></screen> + +<para>The meaning of the switches:</para> + +<itemizedlist> +<listitem><para><userinput>-s /bin/bash</userinput>: This makes +<userinput>bash</userinput> the default shell for user +<emphasis>lfs</emphasis>.</para></listitem> + +<listitem><para><userinput>-m</userinput>: This creates a home +directory for <emphasis>lfs</emphasis>.</para></listitem> + +<listitem><para><userinput>-k /dev/null</userinput>: This parameter +prevents possible copying of files from a skeleton directory (default +is <filename>/etc/skel</filename>) by changing the input location to +the special null device.</para></listitem> +</itemizedlist> + +<para>If you want to be able to log in as <emphasis>lfs</emphasis>, then give +<emphasis>lfs</emphasis> a password:</para> + +<screen><userinput>passwd lfs</userinput></screen> + +<para>and grant <emphasis>lfs</emphasis> full access to +<filename class="directory">$LFS/tools</filename> by making +<emphasis>lfs</emphasis> the directory owner:</para> + +<screen><userinput>chown lfs $LFS/tools</userinput></screen> + +<para>If you made a separate working directory as suggested, give user +<emphasis>lfs</emphasis> ownership of this directory too:</para> + +<screen><userinput>chown lfs $LFS/sources</userinput></screen> + +<para>Next, login as user <emphasis>lfs</emphasis>. This can be done via a +virtual console, through a display manager, or with the following substitute +user command:</para> + +<screen><userinput>su - lfs</userinput></screen> + +<para>The <quote><command>-</command></quote> instructs <command>su</command> to +start a <emphasis>login</emphasis> shell.</para> + +</sect1> |