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

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

Update user/groups for systemd update.

  • Property mode set to 100644
File size: 6.6 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-boot-pwdgroup">
9 <?dbhtml filename="pwdgroup.html"?>
10
11 <title>Creating the passwd and group Files</title>
12
13 <indexterm zone="ch-boot-pwdgroup">
14 <primary sortas="e-/etc/passwd">/etc/passwd</primary>
15 <secondary>boot</secondary>
16 </indexterm>
17
18 <indexterm zone="ch-boot-pwdgroup">
19 <primary sortas="e-/etc/group">/etc/group</primary>
20 <secondary>boot</secondary>
21 </indexterm>
22
23 <para os="a">In order for user <systemitem class="username">root</systemitem> to
24 be able to login and for the name <quote>root</quote> to be recognized,
25 there must be relevant entries in the <filename>/etc/passwd</filename>
26 and <filename>/etc/group</filename> files.</para>
27
28 <para>Create the <filename>${CLFS}/etc/passwd</filename> file by running
29 the following command:</para>
30
31<screen><userinput>cat &gt; ${CLFS}/etc/passwd &lt;&lt; "EOF"
32<literal>root::&uid-root;:&gid-root;:root:/root:/bin/bash</literal>
33<literal>bin:x:&uid-bin;:&gid-bin;:/bin:/bin/false</literal>
34<literal>daemon:x:&uid-daemon;:&gid-daemon;:/sbin:/bin/false</literal>
35<literal>messagebus:x:&uid-messagebus;:&gid-messagebus;:D-Bus Message Daemon User:/dev/null:/bin/false</literal>
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>
44<literal>nobody:x:&uid-nobody;:&gid-nogroup;:Unprivileged User:/dev/null:/bin/false</literal>
45EOF</userinput></screen>
46
47 <para os="b">The actual password for <systemitem class="username">root</systemitem>
48 (the <quote>::</quote> used here is just a placeholder and allows you to login
49 with no password) will be set later.</para>
50
51 <variablelist os="c">
52
53 <title>Additional users you may want to add if not already included:</title>
54
55 <varlistentry>
56 <term><literal>adm:x:&uid-adm;:&gid-adm;:adm:/var/adm:/bin/false</literal></term>
57 <listitem>
58 <para>Was used for programs that performed administrative tasks.</para>
59 </listitem>
60 </varlistentry>
61 <varlistentry>
62 <term><literal>lp:x:&uid-lp;:&gid-lp;:lp:/var/spool/lp:/bin/false</literal></term>
63 <listitem>
64 <para>Used by programs for printing</para>
65 </listitem>
66 </varlistentry>
67 <varlistentry>
68 <term><literal>mail:x:&uid-mail;:&gid-mail;:mail:/var/mail:/bin/false</literal></term>
69 <listitem>
70 <para>Often used by email programs</para>
71 </listitem>
72 </varlistentry>
73 <varlistentry>
74 <term><literal>news:x:&uid-news;:&gid-news;:news:/var/spool/news:/bin/false</literal></term>
75 <listitem>
76 <para>Often used for network news servers</para>
77 </listitem>
78 </varlistentry>
79 <varlistentry>
80 <term><literal>operator:x:&uid-operator;:&gid-root;:operator:/root:/bin/bash</literal></term>
81 <listitem>
82 <para>Often used to allow system operators to access the system</para>
83 </listitem>
84 </varlistentry>
85 <varlistentry>
86 <term><literal>postmaster:x:&uid-postmaster;:&gid-mail;:postmaster:/var/spool/mail:/bin/false</literal></term>
87 <listitem>
88 <para>Generally used as an account that receives all the information of troubles with the mail server</para>
89 </listitem>
90 </varlistentry>
91 </variablelist>
92
93 <para>Create the <filename>${CLFS}/etc/group</filename> file by running
94 the following command:</para>
95
96<screen><userinput>cat &gt; ${CLFS}/etc/group &lt;&lt; "EOF"
97<literal>root:x:0:
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;:
112cdrom:x:&gid-cdrom;:
113adm:x:&gid-adm;:
114messagebus:x:&gid-messagebus;:
115mail:x:&gid-mail;:
116wheel:x:&gid-wheel;:
117nogroup:x:&gid-nogroup;:</literal>
118EOF</userinput></screen>
119
120 <variablelist os="d">
121
122 <title>Additional groups you may want to add if not already included:</title>
123
124 <varlistentry>
125 <term><literal>console:x:&gid-console;:</literal></term>
126 <listitem>
127 <para>This group has direct access to the console</para>
128 </listitem>
129 </varlistentry>
130 <varlistentry>
131 <term><literal>cdrw:x:&gid-cdrw;:</literal></term>
132 <listitem>
133 <para>This group is allowed to use the CDRW drive</para>
134 </listitem>
135 </varlistentry>
136 <varlistentry>
137 <term><literal>news:x:&gid-news;:news</literal></term>
138 <listitem>
139 <para>Used by Network News Servers</para>
140 </listitem>
141 </varlistentry>
142 <varlistentry>
143 <term><literal>users:x:&gid-users;:</literal></term>
144 <listitem>
145 <para>The default GID used by shadow for new users</para>
146 </listitem>
147 </varlistentry>
148 <varlistentry>
149 <term><literal>nobody:x:&gid-nogroup;:</literal></term>
150 <listitem>
151 <para>This is used by NFS</para>
152 </listitem>
153 </varlistentry>
154 </variablelist>
155
156 <para os="e">The created groups are not part of any standard&mdash;they are
157 groups decided on in part by the requirements of the Systemd configuration
158 in the final system, and in part by common convention employed by a
159 number of existing Linux distributions. The Linux Standard Base (LSB,
160 available at
161 <ulink url="http://www.linuxfoundation.org/collaborate/workgroups/lsb"/>)
162 recommends only that, besides the group <quote>root</quote> with a Group ID
163 (GID) of 0, a group <quote>bin</quote> with a GID of 1 be present. All other
164 group names and GIDs can be chosen freely by the system administrator since
165 well-written programs do not depend on GID numbers, but rather use the
166 group's name.</para>
167
168</sect1>
Note: See TracBrowser for help on using the repository browser.