source: chapter06/shadow.xml@ 90b56f5

6.1 6.1.1
Last change on this file since 90b56f5 was 90b56f5, checked in by Archaic <archaic@…>, 19 years ago

Round 2 of several minor wording changes in chapter 6. (merged from trunk r6258)

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/6.1/BOOK@6299 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 14.6 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
3 <!ENTITY % general-entities SYSTEM "../general.ent">
4 %general-entities;
5]>
6<sect1 id="ch-system-shadow" role="wrap">
7<title>Shadow-&shadow-version;</title>
8<?dbhtml filename="shadow.html"?>
9
10<indexterm zone="ch-system-shadow"><primary sortas="a-Shadow">Shadow</primary></indexterm>
11
12<sect2 role="package"><title/>
13<para>The Shadow package contains programs for handling passwords in a secure
14way.</para>
15
16<segmentedlist>
17<segtitle>&buildtime;</segtitle>
18<segtitle>&diskspace;</segtitle>
19<seglistitem><seg>0.4 SBU</seg><seg>13.7 MB</seg></seglistitem>
20</segmentedlist>
21
22<segmentedlist>
23<segtitle>&dependencies;</segtitle>
24<seglistitem><seg>Bash, Binutils, Bison, Coreutils,
25Diffutils, GCC, Gettext, Glibc, Grep, Make, and Sed</seg></seglistitem>
26</segmentedlist>
27</sect2>
28
29<sect2 role="installation">
30<title>Installation of Shadow</title>
31
32<para>Prepare Shadow for compilation:</para>
33
34<screen><userinput>./configure --libdir=/lib --enable-shared</userinput></screen>
35
36<para>Remove the installation of the <command>groups</command> program, and its man page as
37Coreutils provides a better version:</para>
38
39<screen><userinput>sed -i 's/groups$(EXEEXT) //' src/Makefile
40sed -i '/groups/d' man/Makefile</userinput></screen>
41
42<para>Compile the package:</para>
43
44<screen><userinput>make</userinput></screen>
45
46<para>Install the package:</para>
47
48<screen><userinput>make install</userinput></screen>
49
50<para id="shadow-limits-login_access">Shadow uses two files to configure
51authentication settings for the system. Install these two configuration
52files:</para>
53
54<indexterm zone="shadow-limits-login_access"><primary sortas="e-/etc/limits">/etc/limits</primary></indexterm>
55<indexterm zone="shadow-limits-login_access"><primary sortas="e-/etc/login.access">/etc/login.access</primary></indexterm>
56
57<screen><userinput>cp etc/{limits,login.access} /etc</userinput></screen>
58
59<para id="shadow-login_defs">Instead of using the default <emphasis>crypt</emphasis> method,
60use the more secure <emphasis>MD5</emphasis> method of password
61encryption, which also allows passwords longer than 8 characters. It
62is also necessary to change the obsolete <filename
63class="directory">/var/spool/mail</filename> location for user
64mailboxes that Shadow uses by default to the <filename
65class="directory">/var/mail</filename> location used currently. Both
66of these can be accomplished by changing the relevant configuration
67file while copying it to its destination:</para>
68
69<indexterm zone="shadow-login_defs"><primary sortas="e-/etc/login.defs">/etc/login.defs</primary></indexterm>
70
71<screen><userinput>sed -e's@#MD5_CRYPT_ENAB.no@MD5_CRYPT_ENAB yes@' \
72 -e 's@/var/spool/mail@/var/mail@' \
73 etc/login.defs.linux &gt; /etc/login.defs</userinput></screen>
74
75<para>Move a misplaced program to its proper location:</para>
76
77<screen><userinput>mv /usr/bin/passwd /bin</userinput></screen>
78
79<beginpage/>
80
81<para>Move Shadow's libraries to more appropriate locations:</para>
82
83<screen><userinput>mv /lib/libshadow.*a /usr/lib
84rm /lib/libshadow.so
85ln -sf ../../lib/libshadow.so.0 /usr/lib/libshadow.so</userinput></screen>
86
87<para>The <parameter>-D</parameter> option of the
88<command>useradd</command> program requires the <filename
89class="directory">/etc/default</filename> directory for it to work
90properly:</para>
91
92<screen><userinput>mkdir /etc/default</userinput></screen>
93
94</sect2>
95
96
97<sect2 id="conf-shadow" role="configuration"><title>Configuring Shadow</title>
98<indexterm zone="conf-shadow">
99<primary sortas="a-Shadow">Shadow</primary>
100<secondary>configuring</secondary></indexterm>
101
102<para>This package contains utilities to add, modify, and delete users
103and groups; set and change their passwords; and perform other
104administrative tasks. For a full explanation of what
105<emphasis>password shadowing</emphasis> means, see the
106<filename>doc/HOWTO</filename> file within the unpacked source tree.
107If using Shadow support, keep in mind that programs which need to
108verify passwords (display managers, FTP programs, pop3 daemons, etc.)
109must be Shadow-compliant. That is, they need to be able to work with
110shadowed passwords.</para>
111
112<para>To enable shadowed passwords, run the following command:</para>
113
114<screen><userinput>pwconv</userinput></screen>
115
116<para>To enable shadowed group passwords, run:</para>
117
118<screen><userinput>grpconv</userinput></screen>
119
120<para>Under normal circumstances, passwords will not have been created
121yet. However, if returning to this section later to enable shadowing,
122reset any current user passwords with the <command>passwd</command>
123command or any group passwords with the <command>gpasswd</command>
124command.</para>
125
126</sect2>
127
128
129<sect2 role="configuration">
130<title>Setting the root password</title>
131
132<para>Choose a password for user <emphasis>root</emphasis> and set it
133by running:</para>
134
135<screen><userinput>passwd root</userinput></screen>
136</sect2>
137
138
139<sect2 id="contents-shadow" role="content"><title>Contents of Shadow</title>
140
141<segmentedlist>
142<segtitle>Installed programs</segtitle>
143<segtitle>Installed libraries</segtitle>
144<seglistitem><seg>chage, chfn, chpasswd, chsh, expiry, faillog, gpasswd,
145groupadd, groupdel, groupmod, groups, grpck, grpconv, grpunconv, lastlog, login,
146logoutd, mkpasswd, newgrp, newusers, passwd, pwck, pwconv, pwunconv, sg
147(link to newgrp), useradd, userdel, usermod, vigr (link to vipw), and vipw</seg>
148<seg>libshadow.[a,so]</seg>
149</seglistitem>
150</segmentedlist>
151
152<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
153<?dbfo list-presentation="list"?>
154<?dbhtml list-presentation="table"?>
155
156<varlistentry id="chage">
157<term><command>chage</command></term>
158<listitem>
159<para>Used to change the maximum number of days between obligatory
160password changes</para>
161<indexterm zone="ch-system-shadow chage"><primary sortas="b-chage">chage</primary></indexterm>
162</listitem>
163</varlistentry>
164
165<varlistentry id="chfn">
166<term><command>chfn</command></term>
167<listitem>
168<para>Used to change a user's full name and other information</para>
169<indexterm zone="ch-system-shadow chfn"><primary sortas="b-chfn">chfn</primary></indexterm>
170</listitem>
171</varlistentry>
172
173<varlistentry id="chpasswd">
174<term><command>chpasswd</command></term>
175<listitem>
176<para>Used to update the passwords of an entire series of user
177accounts</para>
178<indexterm zone="ch-system-shadow chpasswd"><primary sortas="b-chpasswd">chpasswd</primary></indexterm>
179</listitem>
180</varlistentry>
181
182<varlistentry id="chsh">
183<term><command>chsh</command></term>
184<listitem>
185<para>Used to change a user's default login shell</para>
186<indexterm zone="ch-system-shadow chsh"><primary sortas="b-chsh">chsh</primary></indexterm>
187</listitem>
188</varlistentry>
189
190<varlistentry id="expiry">
191<term><command>expiry</command></term>
192<listitem>
193<para>Checks and enforces the current password expiration policy</para>
194<indexterm zone="ch-system-shadow expiry"><primary sortas="b-expiry">expiry</primary></indexterm>
195</listitem>
196</varlistentry>
197
198<varlistentry id="faillog">
199<term><command>faillog</command></term>
200<listitem>
201<para>Is used to examine the log of login failures, to set a maximum number of
202failures before an account is blocked, or to reset the failure count</para>
203<indexterm zone="ch-system-shadow faillog"><primary sortas="b-faillog">faillog</primary></indexterm>
204</listitem>
205</varlistentry>
206
207<varlistentry id="gpasswd">
208<term><command>gpasswd</command></term>
209<listitem>
210<para>Is used to add and delete members and administrators to groups</para>
211<indexterm zone="ch-system-shadow gpasswd"><primary sortas="b-gpasswd">gpasswd</primary></indexterm>
212</listitem>
213</varlistentry>
214
215<varlistentry id="groupadd">
216<term><command>groupadd</command></term>
217<listitem>
218<para>Creates a group with the given name</para>
219<indexterm zone="ch-system-shadow groupadd"><primary sortas="b-groupadd">groupadd</primary></indexterm>
220</listitem>
221</varlistentry>
222
223<varlistentry id="groupdel">
224<term><command>groupdel</command></term>
225<listitem>
226<para>Deletes the group with the given name</para>
227<indexterm zone="ch-system-shadow groupdel"><primary sortas="b-groupdel">groupdel</primary></indexterm>
228</listitem>
229</varlistentry>
230
231<varlistentry id="groupmod">
232<term><command>groupmod</command></term>
233<listitem>
234<para>Is used to modify the given group's name or GID</para>
235<indexterm zone="ch-system-shadow groupmod"><primary sortas="b-groupmod">groupmod</primary></indexterm>
236</listitem>
237</varlistentry>
238
239<varlistentry id="groups">
240<term><command>groups</command></term>
241<listitem>
242<para>Reports the groups of which the given users are members</para>
243<indexterm zone="ch-system-shadow groups"><primary sortas="b-groups">groups</primary></indexterm>
244</listitem>
245</varlistentry>
246
247<varlistentry id="grpck">
248<term><command>grpck</command></term>
249<listitem>
250<para>Verifies the integrity of the group files <filename>/etc/group</filename>
251and <filename>/etc/gshadow</filename></para>
252<indexterm zone="ch-system-shadow grpck"><primary sortas="b-grpck">grpck</primary></indexterm>
253</listitem>
254</varlistentry>
255
256<varlistentry id="grpconv">
257<term><command>grpconv</command></term>
258<listitem>
259<para>Creates or updates the shadow group file from the normal group file</para>
260<indexterm zone="ch-system-shadow grpconv"><primary sortas="b-grpconv">grpconv</primary></indexterm>
261</listitem>
262</varlistentry>
263
264<varlistentry id="grpunconv">
265<term><command>grpunconv</command></term>
266<listitem>
267<para>Updates <filename>/etc/group</filename>
268from <filename>/etc/gshadow</filename> and then deletes the latter</para>
269<indexterm zone="ch-system-shadow grpunconv"><primary sortas="b-grpunconv">grpunconv</primary></indexterm>
270</listitem>
271</varlistentry>
272
273<varlistentry id="lastlog">
274<term><command>lastlog</command></term>
275<listitem>
276<para>Reports the most recent login of all users or of a given user</para>
277<indexterm zone="ch-system-shadow lastlog"><primary sortas="b-lastlog">lastlog</primary></indexterm>
278</listitem>
279</varlistentry>
280
281<varlistentry id="login">
282<term><command>login</command></term>
283<listitem>
284<para>Is used by the system to let users sign on</para>
285<indexterm zone="ch-system-shadow login"><primary sortas="b-login">login</primary></indexterm>
286</listitem>
287</varlistentry>
288
289<varlistentry id="logoutd">
290<term><command>logoutd</command></term>
291<listitem>
292<para>Is a daemon used to enforce restrictions on log-on time and ports</para>
293<indexterm zone="ch-system-shadow logoutd"><primary sortas="b-logoutd">logoutd</primary></indexterm>
294</listitem>
295</varlistentry>
296
297<varlistentry id="mkpasswd">
298<term><command>mkpasswd</command></term>
299<listitem>
300<para>Generates random passwords</para>
301<indexterm zone="ch-system-shadow mkpasswd"><primary sortas="b-mkpasswd">mkpasswd</primary></indexterm>
302</listitem>
303</varlistentry>
304
305<varlistentry id="newgrp">
306<term><command>newgrp</command></term>
307<listitem>
308<para>Is used to change the current GID during a login session</para>
309<indexterm zone="ch-system-shadow newgrp"><primary sortas="b-newgrp">newgrp</primary></indexterm>
310</listitem>
311</varlistentry>
312
313<varlistentry id="newusers">
314<term><command>newusers</command></term>
315<listitem>
316<para>Is used to create or update an entire series of user accounts</para>
317<indexterm zone="ch-system-shadow newusers"><primary sortas="b-newusers">newusers</primary></indexterm>
318</listitem>
319</varlistentry>
320
321<varlistentry id="passwd">
322<term><command>passwd</command></term>
323<listitem>
324<para>Is used to change the password for a user or group account</para>
325<indexterm zone="ch-system-shadow passwd"><primary sortas="b-passwd">passwd</primary></indexterm>
326</listitem>
327</varlistentry>
328
329<varlistentry id="pwck">
330<term><command>pwck</command></term>
331<listitem>
332<para>Verifies the integrity of the password files
333<filename>/etc/passwd</filename> and <filename>/etc/shadow</filename></para>
334<indexterm zone="ch-system-shadow pwck"><primary sortas="b-pwck">pwck</primary></indexterm>
335</listitem>
336</varlistentry>
337
338<varlistentry id="pwconv">
339<term><command>pwconv</command></term>
340<listitem>
341<para>Creates or updates the shadow password file from the normal
342password file</para>
343<indexterm zone="ch-system-shadow pwconv"><primary sortas="b-pwconv">pwconv</primary></indexterm>
344</listitem>
345</varlistentry>
346
347<varlistentry id="pwunconv">
348<term><command>pwunconv</command></term>
349<listitem>
350<para>Updates <filename>/etc/passwd</filename>
351from <filename>/etc/shadow</filename> and then deletes the latter</para>
352<indexterm zone="ch-system-shadow pwunconv"><primary sortas="b-pwunconv">pwunconv</primary></indexterm>
353</listitem>
354</varlistentry>
355
356<varlistentry id="sg">
357<term><command>sg</command></term>
358<listitem>
359<para>Executes a given command while the user's GID
360is set to that of the given group</para>
361<indexterm zone="ch-system-shadow sg"><primary sortas="b-sg">sg</primary></indexterm>
362</listitem>
363</varlistentry>
364
365<varlistentry id="su">
366<term><command>su</command></term>
367<listitem>
368<indexterm zone="ch-system-shadow su"><primary sortas="b-su">su</primary></indexterm>
369<para>Runs a shell with substitute user and group IDs</para>
370</listitem>
371</varlistentry>
372
373<varlistentry id="useradd">
374<term><command>useradd</command></term>
375<listitem>
376<para>Creates a new user with the given name, or updates the default
377new-user information</para>
378<indexterm zone="ch-system-shadow useradd"><primary sortas="b-useradd">useradd</primary></indexterm>
379</listitem>
380</varlistentry>
381
382<varlistentry id="userdel">
383<term><command>userdel</command></term>
384<listitem>
385<para>Deletes the given user account</para>
386<indexterm zone="ch-system-shadow userdel"><primary sortas="b-userdel">userdel</primary></indexterm>
387</listitem>
388</varlistentry>
389
390<varlistentry id="usermod">
391<term><command>usermod</command></term>
392<listitem>
393<para>Is used to modify the given user's login name, User
394Identification (UID),
395shell, initial group, home directory, etc.</para>
396<indexterm zone="ch-system-shadow usermod"><primary sortas="b-usermod">usermod</primary></indexterm>
397</listitem>
398</varlistentry>
399
400<varlistentry id="vigr">
401<term><command>vigr</command></term>
402<listitem>
403<para>Edits the <filename>/etc/group</filename> or
404<filename>/etc/gshadow</filename> files</para>
405<indexterm zone="ch-system-shadow vigr"><primary sortas="b-vigr">vigr</primary></indexterm>
406</listitem>
407</varlistentry>
408
409<varlistentry id="vipw">
410<term><command>vipw</command></term>
411<listitem>
412<para>Edits the <filename>/etc/passwd</filename> or
413<filename>/etc/shadow</filename> files</para>
414<indexterm zone="ch-system-shadow vipw"><primary sortas="b-vipw">vipw</primary></indexterm>
415</listitem>
416</varlistentry>
417
418<varlistentry id="libshadow">
419<term><filename class="libraryfile">libshadow</filename></term>
420<listitem>
421<para>Contains functions used by most programs in this package</para>
422<indexterm zone="ch-system-shadow libshadow"><primary sortas="c-libshadow">libshadow</primary></indexterm>
423</listitem>
424</varlistentry>
425</variablelist>
426
427</sect2>
428
429</sect1>
430
Note: See TracBrowser for help on using the repository browser.