source: BOOK/boot/common/pwdgroup.xml@ 31a5d11

clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 31a5d11 was a709a94, checked in by William Harrington <kb0iic@…>, 11 years ago

Add some groups to the chroot section group and some users to the chroot section passwd and add wheel and adm to groups for systemd.

  • Property mode set to 100644
File size: 7.1 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, group, and log Files</title>
12
13 <indexterm zone="ch-boot-pwdgroup">
14 <primary sortas="e-/etc/passwd">/etc/passwd</primary>
15 </indexterm>
16
17 <indexterm zone="ch-boot-pwdgroup">
18 <primary sortas="e-/etc/group">/etc/group</primary>
19 </indexterm>
20
21 <indexterm zone="ch-boot-pwdgroup">
22 <primary sortas="e-/var/run/utmp">/var/run/utmp</primary>
23 </indexterm>
24
25 <indexterm zone="ch-boot-pwdgroup">
26 <primary sortas="e-/var/log/btmp">/var/log/btmp</primary>
27 </indexterm>
28
29 <indexterm zone="ch-boot-pwdgroup">
30 <primary sortas="e-/var/log/lastlog">/var/log/lastlog</primary>
31 </indexterm>
32
33 <indexterm zone="ch-boot-pwdgroup">
34 <primary sortas="e-/var/log/wtmp">/var/log/wtmp</primary>
35 </indexterm>
36
37 <para os="a">In order for user <systemitem class="username">root</systemitem> to
38 be able to login and for the name <quote>root</quote> to be recognized,
39 there must be relevant entries in the <filename>/etc/passwd</filename>
40 and <filename>/etc/group</filename> files.</para>
41
42 <para>Create the <filename>${CLFS}/etc/passwd</filename> file by running
43 the following command:</para>
44
45<screen><userinput>cat &gt; ${CLFS}/etc/passwd &lt;&lt; "EOF"
46<literal>root:x:&uid-root;:&gid-root;:root:/root:/bin/bash</literal>
47<literal>messagebus:x:&uid-messagebus;:&gid-messagebus;:D-Bus Message Daemon User:/dev/null:/bin/false</literal>
48EOF</userinput></screen>
49
50 <para os="b">The actual password for <systemitem class="username">root</systemitem>
51 (the <quote>::</quote> used here is just a placeholder and allows you to login
52 with no password) will be set later.</para>
53
54 <variablelist os="c">
55
56 <title>Additional users you may want to add if not already included:</title>
57
58 <varlistentry>
59 <term><literal>bin:x:&uid-bin;:&gid-bin;:bin:/bin:/bin/false</literal></term>
60 <listitem>
61 <para>Can be useful for compatibility with legacy applications.</para>
62 </listitem>
63 </varlistentry>
64 <varlistentry>
65 <term><literal>daemon:x:&uid-daemon;:&gid-daemon;:daemon:/sbin:/bin/false</literal></term>
66 <listitem>
67 <para>It is often recommended to use an unprivileged User ID/Group ID
68 for daemons to run as, in order to limit their access to the system.</para>
69 </listitem>
70 </varlistentry>
71 <varlistentry>
72 <term><literal>adm:x:&uid-adm;:&gid-adm;:adm:/var/adm:/bin/false</literal></term>
73 <listitem>
74 <para>Was used for programs that performed administrative tasks.</para>
75 </listitem>
76 </varlistentry>
77 <varlistentry>
78 <term><literal>lp:x:&uid-lp;:&gid-lp;:lp:/var/spool/lp:/bin/false</literal></term>
79 <listitem>
80 <para>Used by programs for printing</para>
81 </listitem>
82 </varlistentry>
83 <varlistentry>
84 <term><literal>mail:x:&uid-mail;:&gid-mail;:mail:/var/mail:/bin/false</literal></term>
85 <listitem>
86 <para>Often used by email programs</para>
87 </listitem>
88 </varlistentry>
89 <varlistentry>
90 <term><literal>news:x:&uid-news;:&gid-news;:news:/var/spool/news:/bin/false</literal></term>
91 <listitem>
92 <para>Often used for network news servers</para>
93 </listitem>
94 </varlistentry>
95 <varlistentry>
96 <term><literal>operator:x:&uid-operator;:&gid-root;:operator:/root:/bin/bash</literal></term>
97 <listitem>
98 <para>Often used to allow system operators to access the system</para>
99 </listitem>
100 </varlistentry>
101 <varlistentry>
102 <term><literal>postmaster:x:&uid-postmaster;:&gid-mail;:postmaster:/var/spool/mail:/bin/false</literal></term>
103 <listitem>
104 <para>Generally used as an account that receives all the information of troubles with the mail server</para>
105 </listitem>
106 </varlistentry>
107 <varlistentry>
108 <term><literal>nobody:x:&uid-nobody;:&gid-nobody;:nobody:/:/bin/false</literal></term>
109 <listitem>
110 <para>Used by NFS</para>
111 </listitem>
112 </varlistentry>
113 </variablelist>
114
115 <para>Create the <filename>${CLFS}/etc/group</filename> file by running
116 the following command:</para>
117
118<screen><userinput>cat &gt; ${CLFS}/etc/group &lt;&lt; "EOF"
119<literal>root:x:0:
120bin:x:&gid-bin;:
121sys:x:&gid-sys;:
122kmem:x:&gid-kmem;:
123tty:x:&gid-tty;:
124tape:x:&gid-tape;:
125daemon:x:&gid-daemon;:
126floppy:x:&gid-floppy;:
127disk:x:&gid-disk;:
128lp:x:&gid-lp;:
129dialout:x:&gid-dialout;:
130audio:x:&gid-audio;:
131video:x:&gid-video;:
132utmp:x:&gid-utmp;:
133usb:x:&gid-usb;:
134cdrom:x:&gid-cdrom;:
135messagebus:x:&gid-messagebus;:
136wheel:x:&gid-wheel;:</literal>
137EOF</userinput></screen>
138
139 <variablelist os="d">
140
141 <title>Additional groups you may want to add if not already included:</title>
142
143 <varlistentry>
144 <term><literal>adm:x:&gid-adm;:root,adm,daemon</literal></term>
145 <listitem>
146 <para>All users in this group are allowed to do administrative tasks</para>
147 </listitem>
148 </varlistentry>
149 <varlistentry>
150 <term><literal>console:x:&gid-console;:</literal></term>
151 <listitem>
152 <para>This group has direct access to the console</para>
153 </listitem>
154 </varlistentry>
155 <varlistentry>
156 <term><literal>cdrw:x:&gid-cdrw;:</literal></term>
157 <listitem>
158 <para>This group is allowed to use the CDRW drive</para>
159 </listitem>
160 </varlistentry>
161 <varlistentry>
162 <term><literal>mail:x:&gid-mail;:mail</literal></term>
163 <listitem>
164 <para>Used by MTAs (Mail Transport Agents)</para>
165 </listitem>
166 </varlistentry>
167 <varlistentry>
168 <term><literal>news:x:&gid-news;:news</literal></term>
169 <listitem>
170 <para>Used by Network News Servers</para>
171 </listitem>
172 </varlistentry>
173 <varlistentry>
174 <term><literal>users:x:&gid-users;:</literal></term>
175 <listitem>
176 <para>The default GID used by shadow for new users</para>
177 </listitem>
178 </varlistentry>
179 <varlistentry>
180 <term><literal>nogroup:x:&gid-nogroup;:</literal></term>
181 <listitem>
182 <para>This is a default group used by some programs that do not
183 require a group</para>
184 </listitem>
185 </varlistentry>
186 <varlistentry>
187 <term><literal>nobody:x:&gid-nobody;:</literal></term>
188 <listitem>
189 <para>This is used by NFS</para>
190 </listitem>
191 </varlistentry>
192 </variablelist>
193
194 <para os="e">The created groups are not part of any standard&mdash;they are
195 groups decided on in part by the requirements of the Eudev configuration
196 in the final system, and in part by common convention employed by a
197 number of existing Linux distributions. The Linux Standard Base (LSB,
198 available at <ulink url="http://www.linuxbase.org"/>) recommends only
199 that, besides the group <quote>root</quote> with a Group ID (GID) of 0,
200 a group <quote>bin</quote> with a GID of 1 be present. All other group
201 names and GIDs can be chosen freely by the system administrator since
202 well-written programs do not depend on GID numbers, but rather use the
203 group's name.</para>
204
205</sect1>
Note: See TracBrowser for help on using the repository browser.