source: chapter06/shadow.xml@ 875141e

6.1 6.1.1
Last change on this file since 875141e was 875141e, checked in by Manuel Canales Esparcia <manuel@…>, 19 years ago

Fixing beginpage tags. Fisrt round.

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/6.1/BOOK@6432 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<para>Move Shadow's libraries to more appropriate locations:</para>
80
81<screen><userinput>mv /lib/libshadow.*a /usr/lib
82rm /lib/libshadow.so
83ln -sf ../../lib/libshadow.so.0 /usr/lib/libshadow.so</userinput></screen>
84
85<para>The <parameter>-D</parameter> option of the
86<command>useradd</command> program requires the <filename
87class="directory">/etc/default</filename> directory for it to work
88properly:</para>
89
90<screen><userinput>mkdir /etc/default</userinput></screen>
91
92</sect2>
93
94
95<sect2 id="conf-shadow" role="configuration"><title>Configuring Shadow</title>
96<indexterm zone="conf-shadow">
97<primary sortas="a-Shadow">Shadow</primary>
98<secondary>configuring</secondary></indexterm>
99
100<para>This package contains utilities to add, modify, and delete users
101and groups; set and change their passwords; and perform other
102administrative tasks. For a full explanation of what
103<emphasis>password shadowing</emphasis> means, see the
104<filename>doc/HOWTO</filename> file within the unpacked source tree.
105If using Shadow support, keep in mind that programs which need to
106verify passwords (display managers, FTP programs, pop3 daemons, etc.)
107must be Shadow-compliant. That is, they need to be able to work with
108shadowed passwords.</para>
109
110<para>To enable shadowed passwords, run the following command:</para>
111
112<screen><userinput>pwconv</userinput></screen>
113
114<para>To enable shadowed group passwords, run:</para>
115
116<screen><userinput>grpconv</userinput></screen>
117
118<para>Under normal circumstances, passwords will not have been created
119yet. However, if returning to this section later to enable shadowing,
120reset any current user passwords with the <command>passwd</command>
121command or any group passwords with the <command>gpasswd</command>
122command.</para>
123
124</sect2>
125
126
127<sect2 role="configuration">
128<title>Setting the root password</title>
129
130<para>Choose a password for user <emphasis>root</emphasis> and set it
131by running:</para>
132
133<screen><userinput>passwd root</userinput></screen>
134</sect2>
135
136
137<sect2 id="contents-shadow" role="content"><title>Contents of Shadow</title>
138
139<segmentedlist>
140<segtitle>Installed programs</segtitle>
141<segtitle>Installed libraries</segtitle>
142<seglistitem><seg>chage, chfn, chpasswd, chsh, expiry, faillog, gpasswd,
143groupadd, groupdel, groupmod, groups, grpck, grpconv, grpunconv, lastlog, login,
144logoutd, mkpasswd, newgrp, newusers, passwd, pwck, pwconv, pwunconv, sg
145(link to newgrp), useradd, userdel, usermod, vigr (link to vipw), and vipw</seg>
146<seg>libshadow.[a,so]</seg>
147</seglistitem>
148</segmentedlist>
149
150<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
151<?dbfo list-presentation="list"?>
152<?dbhtml list-presentation="table"?>
153
154<varlistentry id="chage">
155<term><command>chage</command></term>
156<listitem>
157<para>Used to change the maximum number of days between obligatory
158password changes</para>
159<indexterm zone="ch-system-shadow chage"><primary sortas="b-chage">chage</primary></indexterm>
160</listitem>
161</varlistentry>
162
163<varlistentry id="chfn">
164<term><command>chfn</command></term>
165<listitem>
166<para>Used to change a user's full name and other information</para>
167<indexterm zone="ch-system-shadow chfn"><primary sortas="b-chfn">chfn</primary></indexterm>
168</listitem>
169</varlistentry>
170
171<varlistentry id="chpasswd">
172<term><command>chpasswd</command></term>
173<listitem>
174<para>Used to update the passwords of an entire series of user
175accounts</para>
176<indexterm zone="ch-system-shadow chpasswd"><primary sortas="b-chpasswd">chpasswd</primary></indexterm>
177</listitem>
178</varlistentry>
179
180<varlistentry id="chsh">
181<term><command>chsh</command></term>
182<listitem>
183<para>Used to change a user's default login shell</para>
184<indexterm zone="ch-system-shadow chsh"><primary sortas="b-chsh">chsh</primary></indexterm>
185</listitem>
186</varlistentry>
187
188<varlistentry id="expiry">
189<term><command>expiry</command></term>
190<listitem>
191<para>Checks and enforces the current password expiration policy</para>
192<indexterm zone="ch-system-shadow expiry"><primary sortas="b-expiry">expiry</primary></indexterm>
193</listitem>
194</varlistentry>
195
196<varlistentry id="faillog">
197<term><command>faillog</command></term>
198<listitem>
199<para>Is used to examine the log of login failures, to set a maximum number of
200failures before an account is blocked, or to reset the failure count</para>
201<indexterm zone="ch-system-shadow faillog"><primary sortas="b-faillog">faillog</primary></indexterm>
202</listitem>
203</varlistentry>
204
205<varlistentry id="gpasswd">
206<term><command>gpasswd</command></term>
207<listitem>
208<para>Is used to add and delete members and administrators to groups</para>
209<indexterm zone="ch-system-shadow gpasswd"><primary sortas="b-gpasswd">gpasswd</primary></indexterm>
210</listitem>
211</varlistentry>
212
213<varlistentry id="groupadd">
214<term><command>groupadd</command></term>
215<listitem>
216<para>Creates a group with the given name</para>
217<indexterm zone="ch-system-shadow groupadd"><primary sortas="b-groupadd">groupadd</primary></indexterm>
218</listitem>
219</varlistentry>
220
221<varlistentry id="groupdel">
222<term><command>groupdel</command></term>
223<listitem>
224<para>Deletes the group with the given name</para>
225<indexterm zone="ch-system-shadow groupdel"><primary sortas="b-groupdel">groupdel</primary></indexterm>
226</listitem>
227</varlistentry>
228
229<varlistentry id="groupmod">
230<term><command>groupmod</command></term>
231<listitem>
232<para>Is used to modify the given group's name or GID</para>
233<indexterm zone="ch-system-shadow groupmod"><primary sortas="b-groupmod">groupmod</primary></indexterm>
234</listitem>
235</varlistentry>
236
237<varlistentry id="groups">
238<term><command>groups</command></term>
239<listitem>
240<para>Reports the groups of which the given users are members</para>
241<indexterm zone="ch-system-shadow groups"><primary sortas="b-groups">groups</primary></indexterm>
242</listitem>
243</varlistentry>
244
245<varlistentry id="grpck">
246<term><command>grpck</command></term>
247<listitem>
248<para>Verifies the integrity of the group files <filename>/etc/group</filename>
249and <filename>/etc/gshadow</filename></para>
250<indexterm zone="ch-system-shadow grpck"><primary sortas="b-grpck">grpck</primary></indexterm>
251</listitem>
252</varlistentry>
253
254<varlistentry id="grpconv">
255<term><command>grpconv</command></term>
256<listitem>
257<para>Creates or updates the shadow group file from the normal group file</para>
258<indexterm zone="ch-system-shadow grpconv"><primary sortas="b-grpconv">grpconv</primary></indexterm>
259</listitem>
260</varlistentry>
261
262<varlistentry id="grpunconv">
263<term><command>grpunconv</command></term>
264<listitem>
265<para>Updates <filename>/etc/group</filename>
266from <filename>/etc/gshadow</filename> and then deletes the latter</para>
267<indexterm zone="ch-system-shadow grpunconv"><primary sortas="b-grpunconv">grpunconv</primary></indexterm>
268</listitem>
269</varlistentry>
270
271<varlistentry id="lastlog">
272<term><command>lastlog</command></term>
273<listitem>
274<para>Reports the most recent login of all users or of a given user</para>
275<indexterm zone="ch-system-shadow lastlog"><primary sortas="b-lastlog">lastlog</primary></indexterm>
276</listitem>
277</varlistentry>
278
279<varlistentry id="login">
280<term><command>login</command></term>
281<listitem>
282<para>Is used by the system to let users sign on</para>
283<indexterm zone="ch-system-shadow login"><primary sortas="b-login">login</primary></indexterm>
284</listitem>
285</varlistentry>
286
287<varlistentry id="logoutd">
288<term><command>logoutd</command></term>
289<listitem>
290<para>Is a daemon used to enforce restrictions on log-on time and ports</para>
291<indexterm zone="ch-system-shadow logoutd"><primary sortas="b-logoutd">logoutd</primary></indexterm>
292</listitem>
293</varlistentry>
294
295<varlistentry id="mkpasswd">
296<term><command>mkpasswd</command></term>
297<listitem>
298<para>Generates random passwords</para>
299<indexterm zone="ch-system-shadow mkpasswd"><primary sortas="b-mkpasswd">mkpasswd</primary></indexterm>
300</listitem>
301</varlistentry>
302
303<varlistentry id="newgrp">
304<term><command>newgrp</command></term>
305<listitem>
306<para>Is used to change the current GID during a login session</para>
307<indexterm zone="ch-system-shadow newgrp"><primary sortas="b-newgrp">newgrp</primary></indexterm>
308</listitem>
309</varlistentry>
310
311<varlistentry id="newusers">
312<term><command>newusers</command></term>
313<listitem>
314<para>Is used to create or update an entire series of user accounts</para>
315<indexterm zone="ch-system-shadow newusers"><primary sortas="b-newusers">newusers</primary></indexterm>
316</listitem>
317</varlistentry>
318
319<varlistentry id="passwd">
320<term><command>passwd</command></term>
321<listitem>
322<para>Is used to change the password for a user or group account</para>
323<indexterm zone="ch-system-shadow passwd"><primary sortas="b-passwd">passwd</primary></indexterm>
324</listitem>
325</varlistentry>
326
327<varlistentry id="pwck">
328<term><command>pwck</command></term>
329<listitem>
330<para>Verifies the integrity of the password files
331<filename>/etc/passwd</filename> and <filename>/etc/shadow</filename></para>
332<indexterm zone="ch-system-shadow pwck"><primary sortas="b-pwck">pwck</primary></indexterm>
333</listitem>
334</varlistentry>
335
336<varlistentry id="pwconv">
337<term><command>pwconv</command></term>
338<listitem>
339<para>Creates or updates the shadow password file from the normal
340password file</para>
341<indexterm zone="ch-system-shadow pwconv"><primary sortas="b-pwconv">pwconv</primary></indexterm>
342</listitem>
343</varlistentry>
344
345<varlistentry id="pwunconv">
346<term><command>pwunconv</command></term>
347<listitem>
348<para>Updates <filename>/etc/passwd</filename>
349from <filename>/etc/shadow</filename> and then deletes the latter</para>
350<indexterm zone="ch-system-shadow pwunconv"><primary sortas="b-pwunconv">pwunconv</primary></indexterm>
351</listitem>
352</varlistentry>
353
354<varlistentry id="sg">
355<term><command>sg</command></term>
356<listitem>
357<para>Executes a given command while the user's GID
358is set to that of the given group</para>
359<indexterm zone="ch-system-shadow sg"><primary sortas="b-sg">sg</primary></indexterm>
360</listitem>
361</varlistentry>
362
363<varlistentry id="su">
364<term><command>su</command></term>
365<listitem>
366<indexterm zone="ch-system-shadow su"><primary sortas="b-su">su</primary></indexterm>
367<para>Runs a shell with substitute user and group IDs</para>
368</listitem>
369</varlistentry>
370
371<varlistentry id="useradd">
372<term><command>useradd</command></term>
373<listitem>
374<para>Creates a new user with the given name, or updates the default
375new-user information</para>
376<indexterm zone="ch-system-shadow useradd"><primary sortas="b-useradd">useradd</primary></indexterm>
377</listitem>
378</varlistentry>
379
380<varlistentry id="userdel">
381<term><command>userdel</command></term>
382<listitem>
383<para>Deletes the given user account</para>
384<indexterm zone="ch-system-shadow userdel"><primary sortas="b-userdel">userdel</primary></indexterm>
385</listitem>
386</varlistentry>
387
388<varlistentry id="usermod">
389<term><command>usermod</command></term>
390<listitem>
391<para>Is used to modify the given user's login name, User
392Identification (UID),
393shell, initial group, home directory, etc.</para>
394<indexterm zone="ch-system-shadow usermod"><primary sortas="b-usermod">usermod</primary></indexterm>
395</listitem>
396</varlistentry>
397
398<varlistentry id="vigr">
399<term><command>vigr</command></term>
400<listitem>
401<para>Edits the <filename>/etc/group</filename> or
402<filename>/etc/gshadow</filename> files</para>
403<indexterm zone="ch-system-shadow vigr"><primary sortas="b-vigr">vigr</primary></indexterm>
404</listitem>
405</varlistentry>
406
407<varlistentry id="vipw">
408<term><command>vipw</command></term>
409<listitem>
410<para>Edits the <filename>/etc/passwd</filename> or
411<filename>/etc/shadow</filename> files</para>
412<indexterm zone="ch-system-shadow vipw"><primary sortas="b-vipw">vipw</primary></indexterm>
413</listitem>
414</varlistentry>
415
416<varlistentry id="libshadow">
417<term><filename class="libraryfile">libshadow</filename></term>
418<listitem>
419<para>Contains functions used by most programs in this package</para>
420<indexterm zone="ch-system-shadow libshadow"><primary sortas="c-libshadow">libshadow</primary></indexterm>
421</listitem>
422</varlistentry>
423</variablelist>
424
425</sect2>
426
427</sect1>
428
Note: See TracBrowser for help on using the repository browser.