source: BOOK/boot/common/pwdgroup.xml@ d5d6614

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

Fix formatting.

  • Property mode set to 100644
File size: 7.0 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-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 &gt; ${CLFS}/etc/passwd &lt;&lt; "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>
[1c2c545]36<literal>systemd-bus-proxy:x:&uid-systemd-bus-proxy;:&gid-systemd-bus-proxy;:systemd Bus Proxy:/:/bin/false</literal>
37<literal>systemd-journal-gateway:x:&uid-systemd-journal-gateway;:&gid-systemd-journal-gateway;:systemd Journal Gateway:/:/bin/false</literal>
38<literal>systemd-journal-remote:x:&uid-systemd-journal-remote;:&gid-systemd-journal-remote;:systemd Journal Remote:/:/bin/false</literal>
39<literal>systemd-journal-upload:x:&uid-systemd-journal-upload;:&gid-systemd-journal-upload;:systemd Journal Upload:/:/bin/false</literal>
40<literal>systemd-network:x:&uid-systemd-network;:&gid-systemd-network;:systemd Network Management:/:/bin/false</literal>
41<literal>systemd-resolve:x:&uid-systemd-resolve;:&gid-systemd-resolve;:systemd Resolver:/:/bin/false</literal>
42<literal>systemd-timesync:x:&uid-systemd-timesync;:&gid-systemd-timesync;:systemd Time Synchronization:/:/bin/false</literal>
43<literal>systemd-coredump:x:&uid-systemd-coredump;:&gid-systemd-coredump;:systemd Core Dumper:/:/bin/false</literal>
[43748ab]44<literal>nobody:x:&uid-nobody;:&gid-nogroup;:Unprivileged User:/dev/null:/bin/false</literal>
[65018363]45EOF</userinput></screen>
46
[934e597]47 <para os="b">The actual password for <systemitem class="username">root</systemitem>
[d1ff581]48 (the <quote>::</quote> used here is just a placeholder and allows you to login
[b2011e5]49 with no password) will be set later.</para>
[3f8be484]50
[934e597]51 <variablelist os="c">
[24b004c]52
[a709a94]53 <title>Additional users you may want to add if not already included:</title>
[04fe8e5]54
55 <varlistentry>
[8f1ae86]56 <term><literal>adm:x:&uid-adm;:&gid-adm;:adm:/var/adm:/bin/false</literal></term>
[04fe8e5]57 <listitem>
[292da92]58 <para>Was used for programs that performed administrative tasks.</para>
[04fe8e5]59 </listitem>
60 </varlistentry>
61 <varlistentry>
[8f1ae86]62 <term><literal>lp:x:&uid-lp;:&gid-lp;:lp:/var/spool/lp:/bin/false</literal></term>
[04fe8e5]63 <listitem>
[b2011e5]64 <para>Used by programs for printing</para>
[04fe8e5]65 </listitem>
66 </varlistentry>
67 <varlistentry>
[8f1ae86]68 <term><literal>mail:x:&uid-mail;:&gid-mail;:mail:/var/mail:/bin/false</literal></term>
[04fe8e5]69 <listitem>
[b2011e5]70 <para>Often used by email programs</para>
[04fe8e5]71 </listitem>
72 </varlistentry>
73 <varlistentry>
[8f1ae86]74 <term><literal>news:x:&uid-news;:&gid-news;:news:/var/spool/news:/bin/false</literal></term>
[04fe8e5]75 <listitem>
[292da92]76 <para>Often used for network news servers</para>
[04fe8e5]77 </listitem>
78 </varlistentry>
79 <varlistentry>
[8f1ae86]80 <term><literal>operator:x:&uid-operator;:&gid-root;:operator:/root:/bin/bash</literal></term>
[04fe8e5]81 <listitem>
[292da92]82 <para>Often used to allow system operators to access the system</para>
[04fe8e5]83 </listitem>
84 </varlistentry>
85 <varlistentry>
[8f1ae86]86 <term><literal>postmaster:x:&uid-postmaster;:&gid-mail;:postmaster:/var/spool/mail:/bin/false</literal></term>
[04fe8e5]87 <listitem>
[9b020e6]88 <para>Generally used as an account that receives all the information of troubles with the mail server</para>
[04fe8e5]89 </listitem>
90 </varlistentry>
91 </variablelist>
92
[ca77da8]93 <para>Create the <filename>${CLFS}/etc/group</filename> file by running
[3f8be484]94 the following command:</para>
95
[3f76cac]96<screen><userinput>cat &gt; ${CLFS}/etc/group &lt;&lt; "EOF"
[65018363]97<literal>root:x:0:
[8f1ae86]98bin:x:&gid-bin;:
99sys:x:&gid-sys;:
100kmem:x:&gid-kmem;:
101tty:x:&gid-tty;:
102tape:x:&gid-tape;:
103daemon:x:&gid-daemon;:
104floppy:x:&gid-floppy;:
105disk:x:&gid-disk;:
106lp:x:&gid-lp;:
107dialout:x:&gid-dialout;:
108audio:x:&gid-audio;:
109video:x:&gid-video;:
110utmp:x:&gid-utmp;:
111usb:x:&gid-usb;:
[27f57ec]112cdrom:x:&gid-cdrom;:
[43748ab]113adm:x:&gid-adm;:
[8d713fe]114mail:x:&gid-mail;:
[43748ab]115messagebus:x:&gid-messagebus;:
[8d713fe]116nogroup:x:&gid-nogroup;:
[f38f5c0]117systemd-bus-proxy:x:&gid-systemd-bus-proxy;:
118systemd-journal-gateway:x:&gid-systemd-journal-gateway;:
119systemd-journal-remote:x:&gid-systemd-journal-remote;:
120systemd-journal-upload:x:&gid-systemd-journal-upload;:
121systemd-network:x:&gid-systemd-network;:
122systemd-resolve:x:&gid-systemd-resolve;:
123systemd-timesync:x:&gid-systemd-timesync;:
124systemd-coredump:x:&gid-systemd-coredump;:
[8d713fe]125wheel:x:&gid-wheel;:</literal>
[65018363]126EOF</userinput></screen>
127
[934e597]128 <variablelist os="d">
[8300133]129
[a709a94]130 <title>Additional groups you may want to add if not already included:</title>
[8300133]131
132 <varlistentry>
[8f1ae86]133 <term><literal>console:x:&gid-console;:</literal></term>
[8300133]134 <listitem>
[292da92]135 <para>This group has direct access to the console</para>
[8300133]136 </listitem>
137 </varlistentry>
138 <varlistentry>
[8f1ae86]139 <term><literal>cdrw:x:&gid-cdrw;:</literal></term>
[8300133]140 <listitem>
[292da92]141 <para>This group is allowed to use the CDRW drive</para>
[8300133]142 </listitem>
143 </varlistentry>
144 <varlistentry>
[8f1ae86]145 <term><literal>news:x:&gid-news;:news</literal></term>
[8300133]146 <listitem>
[292da92]147 <para>Used by Network News Servers</para>
[8300133]148 </listitem>
149 </varlistentry>
150 <varlistentry>
[8f1ae86]151 <term><literal>users:x:&gid-users;:</literal></term>
[8300133]152 <listitem>
[b2011e5]153 <para>The default GID used by shadow for new users</para>
[8300133]154 </listitem>
155 </varlistentry>
156 <varlistentry>
[ef54ce8]157 <term><literal>nobody:x:&gid-nogroup;:</literal></term>
[8300133]158 <listitem>
[9b020e6]159 <para>This is used by NFS</para>
[8300133]160 </listitem>
161 </varlistentry>
[a90a072]162 </variablelist>
[3f8be484]163
[934e597]164 <para os="e">The created groups are not part of any standard&mdash;they are
[eb39137]165 groups decided on in part by the requirements of the Systemd configuration
[3f8be484]166 in the final system, and in part by common convention employed by a
167 number of existing Linux distributions. The Linux Standard Base (LSB,
[1b821266]168 available at
169 <ulink url="http://www.linuxfoundation.org/collaborate/workgroups/lsb"/>)
170 recommends only that, besides the group <quote>root</quote> with a Group ID
171 (GID) of 0, a group <quote>bin</quote> with a GID of 1 be present. All other
172 group names and GIDs can be chosen freely by the system administrator since
[3f8be484]173 well-written programs do not depend on GID numbers, but rather use the
174 group's name.</para>
175
176</sect1>
Note: See TracBrowser for help on using the repository browser.