source: BOOK/boot/common/pwdgroup.xml @ 3f76cac

clfs-1.2clfs-2.1clfs-3.0.0-systemdclfs-3.0.0-sysvinitsystemdsysvinit
Last change on this file since 3f76cac was 3f76cac, checked in by Jim Gifford <clfs@…>, 15 years ago

r4227@server: jim | 2006-07-01 23:46:16 -0700
More LFS to CLFS Updates

  • Property mode set to 100644
File size: 5.4 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3  "http://www.oasis-open.org/docbook/xml/4.4/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-${CLFS}/etc/passwd">${CLFS}/etc/passwd</primary>
15  </indexterm>
16
17  <indexterm zone="ch-boot-pwdgroup">
18    <primary sortas="e-${CLFS}/etc/group">${CLFS}/etc/group</primary>
19  </indexterm>
20
21  <indexterm zone="ch-boot-pwdgroup">
22    <primary sortas="e-${CLFS}/var/run/utmp">${CLFS}/var/run/utmp</primary>
23  </indexterm>
24
25  <indexterm zone="ch-boot-pwdgroup">
26    <primary sortas="e-${CLFS}/var/log/btmp">${CLFS}/var/log/btmp</primary>
27  </indexterm>
28
29  <indexterm zone="ch-boot-pwdgroup">
30    <primary sortas="e-${CLFS}/var/log/lastlog">${CLFS}/var/log/lastlog</primary>
31  </indexterm>
32
33  <indexterm zone="ch-boot-pwdgroup">
34    <primary sortas="e-${CLFS}/var/log/wtmp">${CLFS}/var/log/wtmp</primary>
35  </indexterm>
36
37  <para>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>${CLFS}/etc/passwd</filename>
40  and <filename>${CLFS}/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:0:0:root:/root:/bin/bash</literal>
47EOF</userinput></screen>
48
49  <para os="a">The actual password for <systemitem class="username">root</systemitem>
50  (the <quote>x</quote> used here is just a placeholder) will be set
51  later.</para>
52
53  <para>Create the <filename>${CLFS}/etc/group</filename> file by running
54  the following command:</para>
55
56<screen><userinput>cat &gt; ${CLFS}/etc/group &lt;&lt; "EOF"
57<literal>root:x:0:
58bin:x:1:
59sys:x:2:
60kmem:x:3:
61tty:x:4:
62tape:x:5:
63daemon:x:6:
64floppy:x:7:
65disk:x:8:
66lp:x:9:
67dialout:x:10:
68audio:x:11:
69video:x:12:
70utmp:x:13:
71usb:x:14:
72cdrom:x:15:</literal>
73EOF</userinput></screen>
74
75  <variablelist os="c">
76
77    <title>Additional groups you may want to add</title>
78
79    <varlistentry>
80      <term><literal>adm:x:16:root,adm,daemon</literal></term>
81      <listitem>
82        <para>To be written</para>
83      </listitem>
84    </varlistentry>
85    <varlistentry>
86      <term><literal>console:x:17:</literal></term>
87      <listitem>
88        <para>To be written</para>
89      </listitem>
90    </varlistentry>
91    <varlistentry>
92      <term><literal>cdrw:x:18:</literal></term>
93      <listitem>
94        <para>To be written</para>
95      </listitem>
96    </varlistentry>
97    <varlistentry>
98      <term><literal>mail:x:30:mail</literal></term>
99      <listitem>
100        <para>Used by MTAs (Mail Transport Agents)</para>
101      </listitem>
102    </varlistentry>
103    <varlistentry>
104      <term><literal>news:x:31:news</literal></term>
105      <listitem>
106        <para>To be written</para>
107      </listitem>
108    </varlistentry>
109    <varlistentry>
110      <term><literal>uucp:x:32:uucp</literal></term>
111      <listitem>
112        <para>To be written</para>
113      </listitem>
114    </varlistentry>
115    <varlistentry>
116      <term><literal>users:x:100:</literal></term>
117      <listitem>
118        <para>To be written</para>
119      </listitem>
120    </varlistentry>
121    <varlistentry>
122      <term><literal>nogroup:x:65533:</literal></term>
123      <listitem>
124        <para>To be written</para>
125      </listitem>
126    </varlistentry>
127    <varlistentry>
128      <term><literal>nobody:x:65534:</literal></term>
129      <listitem>
130        <para>To be written</para>
131      </listitem>
132    </varlistentry>
133  </variablelist>
134
135  <para os="d">The created groups are not part of any standard&mdash;they are
136  groups decided on in part by the requirements of the Udev configuration
137  in the final system, and in part by common convention employed by a
138  number of existing Linux distributions. The Linux Standard Base (LSB,
139  available at <ulink url="http://www.linuxbase.org"/>) recommends only
140  that, besides the group <quote>root</quote> with a Group ID (GID) of 0,
141  a group <quote>bin</quote> with a GID of 1 be present. All other group
142  names and GIDs can be chosen freely by the system administrator since
143  well-written programs do not depend on GID numbers, but rather use the
144  group's name.</para>
145
146  <para os="e">The <command>login</command>, <command>agetty</command>, and
147  <command>init</command> programs (and others) use a number of log
148  files to record information such as who was logged into the system and
149  when. However, these programs will not write to the log files if they
150  do not already exist. Initialize the log files and give them
151  proper permissions:</para>
152
153<screen><userinput>touch ${CLFS}/var/run/utmp ${CLFS}/var/log/{btmp,lastlog,wtmp}
154chmod -v 664 ${CLFS}/var/run/utmp ${CLFS}/var/log/lastlog
155chmod -v 600 ${CLFS}/var/log/btmp</userinput></screen>
156
157  <para>The <filename>${CLFS}/var/run/utmp</filename> file records the users
158  that are currently logged in. The <filename>${CLFS}/var/log/wtmp</filename>
159  file records all logins and logouts. The
160  <filename>${CLFS}/var/log/lastlog</filename> file records when
161  each user last logged in. The <filename>${CLFS}/var/log/btmp</filename> file
162  records the bad login attempts.</para>
163
164</sect1>
Note: See TracBrowser for help on using the repository browser.