source: BOOK/boot/common/pwdgroup.xml@ 74e049f

clfs-3.0.0-sysvinit sysvinit
Last change on this file since 74e049f was 82fc053, checked in by Chris Staub <chris@…>, 11 years ago

Created sysvinit branch

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