source: BOOK/chroot/common/pwdgroup.xml@ eb39137

clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since eb39137 was 8a62e94, checked in by Chris Staub <chris@…>, 11 years ago

Text updates to remove references to log files that are no longer created

  • Property mode set to 100644
File size: 3.0 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6]>
7
8<sect1 id="ch-chroot-pwdgroup">
9 <?dbhtml filename="pwdgroup.html"?>
10
11 <title>Creating the passwd and group Files</title>
12
13 <indexterm zone="ch-chroot-pwdgroup">
14 <primary sortas="e-/etc/passwd">/etc/passwd</primary>
15 </indexterm>
16
17 <indexterm zone="ch-chroot-pwdgroup">
18 <primary sortas="e-/etc/group">/etc/group</primary>
19 </indexterm>
20
21 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
22 href="../../boot/common/pwdgroup.xml"
23 xpointer="xpointer(//*[@os='a'])"/>
24
25 <para>Create the <filename>/etc/passwd</filename> file by running the
26 following command:</para>
27
28<screen><userinput>cat &gt; /etc/passwd &lt;&lt; "EOF"
29<literal>root:x:&uid-root;:&gid-root;:root:/root:/bin/bash</literal>
30<literal>messagebus:x:&uid-messagebus;:&gid-messagebus;:D-Bus Message Daemon User:/dev/null:/bin/false</literal>
31EOF</userinput></screen>
32
33 <para os="b">The actual password for
34 <systemitem class="username">root</systemitem> (the <quote>x</quote>
35 used here is just a placeholder) will be set later.</para>
36
37 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
38 href="../../boot/common/pwdgroup.xml"
39 xpointer="xpointer(//*[@os='c'])"/>
40
41 <para>Create the <filename>/etc/group</filename> file by running the
42 following command:</para>
43
44<screen><userinput>cat &gt; /etc/group &lt;&lt; "EOF"
45<literal>root:x:0:
46bin:x:&gid-bin;:
47sys:x:&gid-sys;:
48kmem:x:&gid-kmem;:
49tty:x:&gid-tty;:
50tape:x:&gid-tape;:
51daemon:x:&gid-daemon;:
52floppy:x:&gid-floppy;:
53disk:x:&gid-disk;:
54lp:x:&gid-lp;:
55dialout:x:&gid-dialout;:
56audio:x:&gid-audio;:
57video:x:&gid-video;:
58utmp:x:&gid-utmp;:
59usb:x:&gid-usb;:
60cdrom:x:&gid-cdrom;:
61messagebus:x:&gid-messagebus;:
62systemd-journal:x:&gid-systemd-journal;</literal>
63EOF</userinput></screen>
64
65 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
66 href="../../boot/common/pwdgroup.xml"
67 xpointer="xpointer(//*[@os='d'])"/>
68
69 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
70 href="../../boot/common/pwdgroup.xml"
71 xpointer="xpointer(//*[@os='e'])"/>
72
73 <para>To remove the <quote>I have no name!</quote> prompt, start a
74 new shell. Since a full Glibc was installed in <xref
75 linkend="chapter-cross-tools"/> and the <filename>/etc/passwd</filename>
76 and <filename>/etc/group</filename> files have been created, user name
77 and group name resolution will now work.</para>
78
79<screen role="nodump"><userinput>exec /tools/bin/bash --login +h</userinput></screen>
80
81 <para>Note the use of the <parameter>+h</parameter> directive. This tells
82 <command>bash</command> not to use its internal path hashing. Without this
83 directive, <command>bash</command> would remember the paths to binaries it
84 has executed. To ensure the use of the newly compiled binaries as soon as
85 they are installed, the <parameter>+h</parameter> directive will be used
86 for the duration of the next chapters.</para>
87
88</sect1>
Note: See TracBrowser for help on using the repository browser.