source: BOOK/chroot/common/pwdgroup.xml @ 1c2c545

systemd
Last change on this file since 1c2c545 was 1c2c545, checked in by William Harrington <kb0iic@…>, 3 years ago

Update user/groups for systemd update.

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