From 81fd230419b0cfd052b08fc1ed352bb7d49975df Mon Sep 17 00:00:00 2001 From: Gerard Beekmans Date: Sat, 19 Feb 2005 22:16:42 +0000 Subject: Trunk is now identical to Testing git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@4648 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter04/addinguser.xml | 70 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 69 insertions(+), 1 deletion(-) (limited to 'chapter04/addinguser.xml') diff --git a/chapter04/addinguser.xml b/chapter04/addinguser.xml index 5073eac68..d701566ba 100644 --- a/chapter04/addinguser.xml +++ b/chapter04/addinguser.xml @@ -7,17 +7,85 @@ Adding the LFS User -Issue the following commands to add the new user: +When logged in as user root, making a +single mistake can damage or destroy a system. Therefore, we recommend +building the packages in this chapter 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 lfs as +a member of a new group (also named lfs) and use +this user during the installation process. As +root, issue the following commands to add the new +user: groupadd lfs useradd -s /bin/bash -g lfs -m -k /dev/null lfs +The meaning of the command line options: + + + +-s /bin/bash +This makes +bash the default shell for user +lfs. + + + +-g lfs +This option adds user lfs to group +lfs. + + + +-m +This creates a home +directory for lfs. + + + +-k /dev/null +This parameter +prevents possible copying of files from a skeleton directory (default +is /etc/skel) by changing the input location to +the special null device. + + + +lfs +This is the actual name for the created group and +user. + + + +To log in as lfs (as opposed to switching +to user lfs when +logged in as root, which does not require the +lfs user to have a +password), give lfs a password: + passwd lfs +Grant lfs full access to +$LFS/tools by making +lfs the directory owner: + chown lfs $LFS/tools +If a separate working directory was created as suggested, give +user lfs ownership of this directory: + chown lfs $LFS/sources +Next, login as user lfs. This can be done +via a virtual console, through a display manager, or with the +following substitute user command: + su - lfs +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 the Bash man and info pages. + + -- cgit v1.2.3-54-g00ecf