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

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

Update user and group ids ofr systemd 233 update.

  • Property mode set to 100644
File size: 4.4 KB
RevLine 
[3f8be484]1<?xml version="1.0" encoding="ISO-8859-1"?>
[aa18ac0]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
[3f8be484]4  <!ENTITY % general-entities SYSTEM "../../general.ent">
5  %general-entities;
6]>
7
8<sect1 id="ch-chroot-pwdgroup">
9  <?dbhtml filename="pwdgroup.html"?>
10
[8a62e94]11  <title>Creating the passwd and group Files</title>
[3f8be484]12
13  <indexterm zone="ch-chroot-pwdgroup">
14    <primary sortas="e-/etc/passwd">/etc/passwd</primary>
[2ba92901]15    <secondary>chroot</secondary>
[3f8be484]16  </indexterm>
17
18  <indexterm zone="ch-chroot-pwdgroup">
19    <primary sortas="e-/etc/group">/etc/group</primary>
[2ba92901]20    <secondary>chroot</secondary>
[3f8be484]21  </indexterm>
22
[dabbced]23  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
[934e597]24  href="../../boot/common/pwdgroup.xml"
25  xpointer="xpointer(//*[@os='a'])"/>
[24b004c]26
[3f8be484]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"
[8f1ae86]31<literal>root:x:&uid-root;:&gid-root;:root:/root:/bin/bash</literal>
[c3b54fac]32<literal>bin:x:&uid-bin;:&gid-bin;:/bin:/bin/false</literal>
33<literal>daemon:x:&uid-daemon;:&gid-daemon;:/sbin:/bin/false</literal>
[27f57ec]34<literal>messagebus:x:&uid-messagebus;:&gid-messagebus;:D-Bus Message Daemon User:/dev/null:/bin/false</literal>
[dd1df496]35<literal>systemd-bus-proxy:x:&uid-systemd-bus-proxy;:&gid-systemd-bus-proxy;:systemd Bus Proxy:/:/bin/false</literal>
36<literal>systemd-journal-gateway:x:&uid-systemd-journal-gateway;:&gid-systemd-journal-gateway;:systemd Journal Gateway:/:/bin/false</literal>
37<literal>systemd-journal-remote:x:&uid-systemd-journal-remote;:&gid-systemd-journal-remote;:systemd Journal Remote:/:/bin/false</literal>
38<literal>systemd-journal-upload:x:&uid-systemd-journal-upload;:&gid-systemd-journal-upload;:systemd Journal Upload:/:/bin/false</literal>
39<literal>systemd-network:x:&uid-systemd-network;:&gid-systemd-network;:systemd Network Management:/:/bin/false</literal>
40<literal>systemd-resolve:x:&uid-systemd-resolve;:&gid-systemd-resolve;:systemd Resolver:/:/bin/false</literal>
41<literal>systemd-timesync:x:&uid-systemd-timesync;:&gid-systemd-timesync;:systemd Time Synchronization:/:/bin/false</literal>
42<literal>systemd-coredump:x:&uid-systemd-coredump;:&gid-systemd-coredump;:systemd Core Dumper:/:/bin/false</literal>
43
[ef54ce8]44<literal>nobody:x:&uid-nobody;:&gid-nogroup;:Unprivileged User:/dev/null:/bin/false</literal>
[3f8be484]45EOF</userinput></screen>
46
[934e597]47  <para os="b">The actual password for
[b2011e5]48  <systemitem class="username">root</systemitem> (the <quote>x</quote>
49  used here is just a placeholder) will be set later.</para>
[3f8be484]50
[dabbced]51  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
[65018363]52  href="../../boot/common/pwdgroup.xml"
[934e597]53  xpointer="xpointer(//*[@os='c'])"/>
[65018363]54
[3f8be484]55  <para>Create the <filename>/etc/group</filename> file by running the
56  following command:</para>
57
58<screen><userinput>cat &gt; /etc/group &lt;&lt; "EOF"
[65018363]59<literal>root:x:0:
[8f1ae86]60bin:x:&gid-bin;:
61sys:x:&gid-sys;:
62kmem:x:&gid-kmem;:
63tty:x:&gid-tty;:
64tape:x:&gid-tape;:
65daemon:x:&gid-daemon;:
66floppy:x:&gid-floppy;:
67disk:x:&gid-disk;:
68lp:x:&gid-lp;:
69dialout:x:&gid-dialout;:
70audio:x:&gid-audio;:
71video:x:&gid-video;:
72utmp:x:&gid-utmp;:
73usb:x:&gid-usb;:
[27f57ec]74cdrom:x:&gid-cdrom;:
[a709a94]75adm:x:&gid-adm;:
[edaed14]76messagebus:x:&gid-messagebus;:
[a709a94]77systemd-journal:x:&gid-systemd-journal;:
[1c2c545]78systemd-timesync:x:&gid-systemd-timesync;:
[a709a94]79mail:x:&gid-mail;:
[961afdcd]80wheel:x:&gid-wheel;:
[a709a94]81nogroup:x:&gid-nogroup;:</literal>
[3f8be484]82EOF</userinput></screen>
83
[dabbced]84  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
[3f8be484]85  href="../../boot/common/pwdgroup.xml"
[934e597]86  xpointer="xpointer(//*[@os='d'])"/>
[65018363]87
[dabbced]88  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
[65018363]89  href="../../boot/common/pwdgroup.xml"
[934e597]90  xpointer="xpointer(//*[@os='e'])"/>
[65018363]91
[3f8be484]92  <para>To remove the <quote>I have no name!</quote> prompt, start a
93  new shell. Since a full Glibc was installed in <xref
94  linkend="chapter-cross-tools"/> and the <filename>/etc/passwd</filename>
95  and <filename>/etc/group</filename> files have been created, user name
96  and group name resolution will now work.</para>
97
[0f3854e]98<screen role="nodump"><userinput>exec /tools/bin/bash --login +h</userinput></screen>
[3f8be484]99
100  <para>Note the use of the <parameter>+h</parameter> directive. This tells
101  <command>bash</command> not to use its internal path hashing. Without this
102  directive, <command>bash</command> would remember the paths to binaries it
103  has executed. To ensure the use of the newly compiled binaries as soon as
104  they are installed, the <parameter>+h</parameter> directive will be used
[b5b8335]105  for the duration of the next chapters.</para>
[3f8be484]106
107</sect1>
Note: See TracBrowser for help on using the repository browser.