source: BOOK/boot/common/pwdgroup.xml @ 931e709

systemd
Last change on this file since 931e709 was 1b821266, checked in by Chris Staub <chris@…>, 8 years ago

Updated LSB link

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