[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-boot-pwdgroup">
|
---|
| 9 | <?dbhtml filename="pwdgroup.html"?>
|
---|
| 10 |
|
---|
[8a62e94] | 11 | <title>Creating the passwd and group Files</title>
|
---|
[3f8be484] | 12 |
|
---|
| 13 | <indexterm zone="ch-boot-pwdgroup">
|
---|
[91ad4a4] | 14 | <primary sortas="e-/etc/passwd">/etc/passwd</primary>
|
---|
[2ba92901] | 15 | <secondary>boot</secondary>
|
---|
[3f8be484] | 16 | </indexterm>
|
---|
| 17 |
|
---|
| 18 | <indexterm zone="ch-boot-pwdgroup">
|
---|
[91ad4a4] | 19 | <primary sortas="e-/etc/group">/etc/group</primary>
|
---|
[2ba92901] | 20 | <secondary>boot</secondary>
|
---|
[3f8be484] | 21 | </indexterm>
|
---|
| 22 |
|
---|
[934e597] | 23 | <para os="a">In order for user <systemitem class="username">root</systemitem> to
|
---|
[3f8be484] | 24 | be able to login and for the name <quote>root</quote> to be recognized,
|
---|
[91ad4a4] | 25 | there must be relevant entries in the <filename>/etc/passwd</filename>
|
---|
| 26 | and <filename>/etc/group</filename> files.</para>
|
---|
[3f8be484] | 27 |
|
---|
[3f76cac] | 28 | <para>Create the <filename>${CLFS}/etc/passwd</filename> file by running
|
---|
[3f8be484] | 29 | the following command:</para>
|
---|
| 30 |
|
---|
[3f76cac] | 31 | <screen><userinput>cat > ${CLFS}/etc/passwd << "EOF"
|
---|
[a49b75d] | 32 | <literal>root::&uid-root;:&gid-root;:root:/root:/bin/bash</literal>
|
---|
[c3b54fac] | 33 | <literal>bin:x:&uid-bin;:&gid-bin;:/bin:/bin/false</literal>
|
---|
| 34 | <literal>daemon:x:&uid-daemon;:&gid-daemon;:/sbin:/bin/false</literal>
|
---|
[27f57ec] | 35 | <literal>messagebus:x:&uid-messagebus;:&gid-messagebus;:D-Bus Message Daemon User:/dev/null:/bin/false</literal>
|
---|
[43748ab] | 36 | <literal>nobody:x:&uid-nobody;:&gid-nogroup;:Unprivileged User:/dev/null:/bin/false</literal>
|
---|
[65018363] | 37 | EOF</userinput></screen>
|
---|
| 38 |
|
---|
[934e597] | 39 | <para os="b">The actual password for <systemitem class="username">root</systemitem>
|
---|
[d1ff581] | 40 | (the <quote>::</quote> used here is just a placeholder and allows you to login
|
---|
[b2011e5] | 41 | with no password) will be set later.</para>
|
---|
[3f8be484] | 42 |
|
---|
[934e597] | 43 | <variablelist os="c">
|
---|
[04fe8e5] | 44 |
|
---|
[a709a94] | 45 | <title>Additional users you may want to add if not already included:</title>
|
---|
[04fe8e5] | 46 |
|
---|
| 47 | <varlistentry>
|
---|
[8f1ae86] | 48 | <term><literal>adm:x:&uid-adm;:&gid-adm;:adm:/var/adm:/bin/false</literal></term>
|
---|
[04fe8e5] | 49 | <listitem>
|
---|
[292da92] | 50 | <para>Was used for programs that performed administrative tasks.</para>
|
---|
[04fe8e5] | 51 | </listitem>
|
---|
| 52 | </varlistentry>
|
---|
| 53 | <varlistentry>
|
---|
[8f1ae86] | 54 | <term><literal>lp:x:&uid-lp;:&gid-lp;:lp:/var/spool/lp:/bin/false</literal></term>
|
---|
[04fe8e5] | 55 | <listitem>
|
---|
[b2011e5] | 56 | <para>Used by programs for printing</para>
|
---|
[04fe8e5] | 57 | </listitem>
|
---|
| 58 | </varlistentry>
|
---|
| 59 | <varlistentry>
|
---|
[8f1ae86] | 60 | <term><literal>mail:x:&uid-mail;:&gid-mail;:mail:/var/mail:/bin/false</literal></term>
|
---|
[04fe8e5] | 61 | <listitem>
|
---|
[b2011e5] | 62 | <para>Often used by email programs</para>
|
---|
[04fe8e5] | 63 | </listitem>
|
---|
| 64 | </varlistentry>
|
---|
| 65 | <varlistentry>
|
---|
[8f1ae86] | 66 | <term><literal>news:x:&uid-news;:&gid-news;:news:/var/spool/news:/bin/false</literal></term>
|
---|
[04fe8e5] | 67 | <listitem>
|
---|
[292da92] | 68 | <para>Often used for network news servers</para>
|
---|
[04fe8e5] | 69 | </listitem>
|
---|
| 70 | </varlistentry>
|
---|
| 71 | <varlistentry>
|
---|
[8f1ae86] | 72 | <term><literal>operator:x:&uid-operator;:&gid-root;:operator:/root:/bin/bash</literal></term>
|
---|
[04fe8e5] | 73 | <listitem>
|
---|
[292da92] | 74 | <para>Often used to allow system operators to access the system</para>
|
---|
[04fe8e5] | 75 | </listitem>
|
---|
| 76 | </varlistentry>
|
---|
| 77 | <varlistentry>
|
---|
[8f1ae86] | 78 | <term><literal>postmaster:x:&uid-postmaster;:&gid-mail;:postmaster:/var/spool/mail:/bin/false</literal></term>
|
---|
[04fe8e5] | 79 | <listitem>
|
---|
[9b020e6] | 80 | <para>Generally used as an account that receives all the information of troubles with the mail server</para>
|
---|
[04fe8e5] | 81 | </listitem>
|
---|
| 82 | </varlistentry>
|
---|
| 83 | </variablelist>
|
---|
| 84 |
|
---|
[ca77da8] | 85 | <para>Create the <filename>${CLFS}/etc/group</filename> file by running
|
---|
[3f8be484] | 86 | the following command:</para>
|
---|
| 87 |
|
---|
[3f76cac] | 88 | <screen><userinput>cat > ${CLFS}/etc/group << "EOF"
|
---|
[65018363] | 89 | <literal>root:x:0:
|
---|
[8f1ae86] | 90 | bin:x:&gid-bin;:
|
---|
| 91 | sys:x:&gid-sys;:
|
---|
| 92 | kmem:x:&gid-kmem;:
|
---|
| 93 | tty:x:&gid-tty;:
|
---|
| 94 | tape:x:&gid-tape;:
|
---|
| 95 | daemon:x:&gid-daemon;:
|
---|
| 96 | floppy:x:&gid-floppy;:
|
---|
| 97 | disk:x:&gid-disk;:
|
---|
| 98 | lp:x:&gid-lp;:
|
---|
| 99 | dialout:x:&gid-dialout;:
|
---|
| 100 | audio:x:&gid-audio;:
|
---|
| 101 | video:x:&gid-video;:
|
---|
| 102 | utmp:x:&gid-utmp;:
|
---|
| 103 | usb:x:&gid-usb;:
|
---|
[27f57ec] | 104 | cdrom:x:&gid-cdrom;:
|
---|
[43748ab] | 105 | adm:x:&gid-adm;:
|
---|
| 106 | messagebus:x:&gid-messagebus;:
|
---|
| 107 | systemd-journal:x:&gid-systemd-journal;:
|
---|
| 108 | mail:x:&gid-mail;:
|
---|
| 109 | wheel:x:&gid-wheel;:
|
---|
| 110 | nogroup:x:&gid-nogroup;:</literal>
|
---|
[65018363] | 111 | EOF</userinput></screen>
|
---|
| 112 |
|
---|
[934e597] | 113 | <variablelist os="d">
|
---|
[8300133] | 114 |
|
---|
[a709a94] | 115 | <title>Additional groups you may want to add if not already included:</title>
|
---|
[8300133] | 116 |
|
---|
| 117 | <varlistentry>
|
---|
[8f1ae86] | 118 | <term><literal>console:x:&gid-console;:</literal></term>
|
---|
[8300133] | 119 | <listitem>
|
---|
[292da92] | 120 | <para>This group has direct access to the console</para>
|
---|
[8300133] | 121 | </listitem>
|
---|
| 122 | </varlistentry>
|
---|
| 123 | <varlistentry>
|
---|
[8f1ae86] | 124 | <term><literal>cdrw:x:&gid-cdrw;:</literal></term>
|
---|
[8300133] | 125 | <listitem>
|
---|
[292da92] | 126 | <para>This group is allowed to use the CDRW drive</para>
|
---|
[8300133] | 127 | </listitem>
|
---|
| 128 | </varlistentry>
|
---|
| 129 | <varlistentry>
|
---|
[8f1ae86] | 130 | <term><literal>news:x:&gid-news;:news</literal></term>
|
---|
[8300133] | 131 | <listitem>
|
---|
[292da92] | 132 | <para>Used by Network News Servers</para>
|
---|
[8300133] | 133 | </listitem>
|
---|
| 134 | </varlistentry>
|
---|
| 135 | <varlistentry>
|
---|
[8f1ae86] | 136 | <term><literal>users:x:&gid-users;:</literal></term>
|
---|
[8300133] | 137 | <listitem>
|
---|
[b2011e5] | 138 | <para>The default GID used by shadow for new users</para>
|
---|
[8300133] | 139 | </listitem>
|
---|
| 140 | </varlistentry>
|
---|
| 141 | <varlistentry>
|
---|
[ef54ce8] | 142 | <term><literal>nobody:x:&gid-nogroup;:</literal></term>
|
---|
[8300133] | 143 | <listitem>
|
---|
[9b020e6] | 144 | <para>This is used by NFS</para>
|
---|
[8300133] | 145 | </listitem>
|
---|
| 146 | </varlistentry>
|
---|
[a90a072] | 147 | </variablelist>
|
---|
[3f8be484] | 148 |
|
---|
[934e597] | 149 | <para os="e">The created groups are not part of any standard—they are
|
---|
[eb39137] | 150 | groups decided on in part by the requirements of the Systemd configuration
|
---|
[3f8be484] | 151 | in the final system, and in part by common convention employed by a
|
---|
| 152 | number of existing Linux distributions. The Linux Standard Base (LSB,
|
---|
| 153 | available at <ulink url="http://www.linuxbase.org"/>) recommends only
|
---|
| 154 | that, besides the group <quote>root</quote> with a Group ID (GID) of 0,
|
---|
| 155 | a group <quote>bin</quote> with a GID of 1 be present. All other group
|
---|
| 156 | names and GIDs can be chosen freely by the system administrator since
|
---|
| 157 | well-written programs do not depend on GID numbers, but rather use the
|
---|
| 158 | group's name.</para>
|
---|
| 159 |
|
---|
| 160 | </sect1>
|
---|