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

clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since f90d077 was 4317f44, checked in by Joe Ciccone <jciccone@…>, 14 years ago

Merge branch 'master' into systemd

Conflicts:

BOOK/boot/alpha-chapter.xml
BOOK/boot/common/bootscripts.xml
BOOK/boot/mips-chapter.xml
BOOK/boot/mips64-64-chapter.xml
BOOK/boot/mips64-chapter.xml
BOOK/boot/ppc-chapter.xml
BOOK/boot/ppc64-chapter.xml
BOOK/boot/sparc-chapter.xml
BOOK/boot/sparc64-64-chapter.xml
BOOK/boot/sparc64-chapter.xml
BOOK/boot/x86-chapter.xml
BOOK/boot/x86_64-64-chapter.xml
BOOK/boot/x86_64-chapter.xml
BOOK/bootscripts/alpha-chapter.xml
BOOK/bootscripts/mips-chapter.xml
BOOK/bootscripts/mips64-64-chapter.xml
BOOK/bootscripts/mips64-chapter.xml
BOOK/bootscripts/ppc-chapter.xml
BOOK/bootscripts/ppc64-chapter.xml
BOOK/bootscripts/sparc-chapter.xml
BOOK/bootscripts/sparc64-64-chapter.xml
BOOK/bootscripts/sparc64-chapter.xml
BOOK/bootscripts/x86-chapter.xml
BOOK/bootscripts/x86_64-64-chapter.xml
BOOK/bootscripts/x86_64-chapter.xml
BOOK/final-system/alpha-chapter.xml
BOOK/final-system/mips-chapter.xml
BOOK/final-system/mips64-64-chapter.xml
BOOK/final-system/mips64-chapter.xml
BOOK/final-system/multilib/coreutils.xml
BOOK/final-system/multilib/util-linux-64bit.xml
BOOK/final-system/multilib/util-linux-n32.xml
BOOK/final-system/multilib/util-linux.xml
BOOK/final-system/ppc-chapter.xml
BOOK/final-system/ppc64-chapter.xml
BOOK/final-system/sparc-chapter.xml
BOOK/final-system/sparc64-64-chapter.xml
BOOK/final-system/sparc64-chapter.xml
BOOK/final-system/x86-chapter.xml
BOOK/final-system/x86_64-64-chapter.xml
BOOK/final-system/x86_64-chapter.xml

  • Property mode set to 100644
File size: 4.1 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, group, and log 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 <indexterm zone="ch-chroot-pwdgroup">
22 <primary sortas="e-/var/run/utmp">/var/run/utmp</primary>
23 </indexterm>
24
25 <indexterm zone="ch-chroot-pwdgroup">
26 <primary sortas="e-/var/log/btmp">/var/log/btmp</primary>
27 </indexterm>
28
29 <indexterm zone="ch-chroot-pwdgroup">
30 <primary sortas="e-/var/log/lastlog">/var/log/lastlog</primary>
31 </indexterm>
32
33 <indexterm zone="ch-chroot-pwdgroup">
34 <primary sortas="e-/var/log/wtmp">/var/log/wtmp</primary>
35 </indexterm>
36
37 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
38 href="../../boot/common/pwdgroup.xml"
39 xpointer="xpointer(//*[@os='a'])"/>
40
41 <para>Create the <filename>/etc/passwd</filename> file by running the
42 following command:</para>
43
44<screen><userinput>cat &gt; /etc/passwd &lt;&lt; "EOF"
45<literal>root:x:&uid-root;:&gid-root;:root:/root:/bin/bash</literal>
46<literal>messagebus:x:&uid-messagebus;:&gid-messagebus;:D-Bus Message Daemon User:/dev/null:/bin/false</literal>
47EOF</userinput></screen>
48
49 <para os="b">The actual password for
50 <systemitem class="username">root</systemitem> (the <quote>x</quote>
51 used here is just a placeholder) will be set later.</para>
52
53 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
54 href="../../boot/common/pwdgroup.xml"
55 xpointer="xpointer(//*[@os='c'])"/>
56
57 <para>Create the <filename>/etc/group</filename> file by running the
58 following command:</para>
59
60<screen><userinput>cat &gt; /etc/group &lt;&lt; "EOF"
61<literal>root:x:0:
62bin:x:&gid-bin;:
63sys:x:&gid-sys;:
64kmem:x:&gid-kmem;:
65tty:x:&gid-tty;:
66tape:x:&gid-tape;:
67daemon:x:&gid-daemon;:
68floppy:x:&gid-floppy;:
69disk:x:&gid-disk;:
70lp:x:&gid-lp;:
71dialout:x:&gid-dialout;:
72audio:x:&gid-audio;:
73video:x:&gid-video;:
74utmp:x:&gid-utmp;:
75usb:x:&gid-usb;:
76cdrom:x:&gid-cdrom;:
77messagebus:x:&gid-messagebus;:</literal>
78EOF</userinput></screen>
79
80 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
81 href="../../boot/common/pwdgroup.xml"
82 xpointer="xpointer(//*[@os='d'])"/>
83
84 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
85 href="../../boot/common/pwdgroup.xml"
86 xpointer="xpointer(//*[@os='e'])"/>
87
88 <para>To remove the <quote>I have no name!</quote> prompt, start a
89 new shell. Since a full Glibc was installed in <xref
90 linkend="chapter-cross-tools"/> and the <filename>/etc/passwd</filename>
91 and <filename>/etc/group</filename> files have been created, user name
92 and group name resolution will now work.</para>
93
94<screen role="nodump"><userinput>exec /tools/bin/bash --login +h</userinput></screen>
95
96 <para>Note the use of the <parameter>+h</parameter> directive. This tells
97 <command>bash</command> not to use its internal path hashing. Without this
98 directive, <command>bash</command> would remember the paths to binaries it
99 has executed. To ensure the use of the newly compiled binaries as soon as
100 they are installed, the <parameter>+h</parameter> directive will be used
101 for the duration of the next chapters.</para>
102
103 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
104 href="../../boot/common/pwdgroup.xml"
105 xpointer="xpointer(//*[@os='f'])"/>
106
107<screen><userinput>touch /var/run/utmp /var/log/{btmp,lastlog,wtmp}
108chgrp -v utmp /var/run/utmp /var/log/lastlog
109chmod -v 664 /var/run/utmp /var/log/lastlog
110chmod -v 600 /var/log/btmp</userinput></screen>
111
112 <para>The <filename>/var/run/utmp</filename> file records the users that
113 are currently logged in. The <filename>/var/log/wtmp</filename> file records
114 all logins and logouts. The <filename>/var/log/lastlog</filename> file
115 records when each user last logged in. The <filename>/var/log/btmp</filename>
116 file records the bad login attempts.</para>
117
118</sect1>
Note: See TracBrowser for help on using the repository browser.