source: clfs-sysroot/BOOK/final-system/common/shadow.xml@ fa397e4

Last change on this file since fa397e4 was 59fb197, checked in by Jim Gifford <clfs@…>, 18 years ago

r3817@server (orig r1719): jciccone | 2006-06-05 13:56:36 -0700
Brought the clfs-2.0 branch up to trunk.

  • Property mode set to 100644
File size: 19.2 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-system-shadow" role="wrap">
9 <?dbhtml filename="shadow.html"?>
10
11 <title>Shadow-&shadow-version;</title>
12
13 <indexterm zone="ch-system-shadow">
14 <primary sortas="a-Shadow">Shadow</primary>
15 </indexterm>
16
17 <sect2 role="package">
18 <title/>
19
20 <para>The Shadow package contains programs for handling passwords in a
21 secure way.</para>
22
23 </sect2>
24
25 <sect2 role="installation">
26 <title>Installation of Shadow</title>
27
28 <note os="a">
29 <para>If you would like to enforce the use of strong passwords,
30 refer to <ulink url="&blfs-root;view/svn/postlfs/cracklib.html"/>
31 for installing Cracklib prior to building Shadow. Then add
32 <parameter>--with-libcrack</parameter> to the <command>configure</command>
33 command below.</para>
34 </note>
35
36 <para os="b">Create a config.cache containing information about a test that
37 cannot be run when cross-compiling:</para>
38
39<screen os="c"><userinput>echo "ac_cv_func_setpgrp_void=yes" &gt; config.cache</userinput></screen>
40
41 <para os="d">Prepare Shadow for compilation:</para>
42
43<screen os="e"><userinput>./configure --libdir=/lib --enable-shared \
44 --without-libpam --without-audit --without-selinux \
45 --host=${LFS_TARGET} --cache-file=config.cache</userinput></screen>
46
47<para os="f">The meaning of the configure options:</para>
48
49 <variablelist os="g">
50 <varlistentry>
51 <term><parameter>--without-libpam</parameter></term>
52 <listitem><para>Support for Linux-PAM is enabled by default in Shadow,
53 however PAM is not installed on a base LFS system, so this switch
54 disables PAM support in Shadow. For instructions to install PAM and
55 link Shadow to it, you can look at
56 <ulink url="&blfs-root;view/svn/postlfs/shadow.html"/>.</para></listitem>
57 </varlistentry>
58 <varlistentry>
59 <term><parameter>--without-audit</parameter></term>
60 <listitem><para>Support for auditing is enabled by default, but a
61 a library that it needs is not installed in a base LFS system. This
62 switch disables auditing support.</para></listitem>
63 </varlistentry>
64 <varlistentry>
65 <term><parameter>--without-selinux</parameter></term>
66 <listitem><para>Support for selinux is enabled by default, but selinux
67 is not built in a base LFS system and configure will fail without this
68 switch.</para></listitem>
69 </varlistentry>
70 </variablelist>
71
72 <para os="h">Disable the installation of the <command>groups</command>
73 program and its man pages, as Coreutils provides a better version:</para>
74
75<screen os="i"><userinput>cp src/Makefile{,.orig}
76sed 's/groups$(EXEEXT) //' src/Makefile.orig &gt; src/Makefile
77cp man/Makefile{,.orig}
78sed '/groups/d' man/Makefile.orig &gt; man/Makefile</userinput></screen>
79
80 <para os="j">Compile the package:</para>
81
82<screen os="k"><userinput>make</userinput></screen>
83
84 <para os="l">Install the package:</para>
85
86<screen os="m"><userinput>make DESTDIR=${LFS} install</userinput></screen>
87
88 <para id="shadow-limits-login_access" os="n">Shadow uses two files to configure
89 authentication settings for the system. Install these two configuration
90 files:</para>
91
92 <indexterm zone="shadow-limits-login_access" os="o">
93 <primary sortas="e-/etc/limits">/etc/limits</primary>
94 </indexterm>
95
96 <indexterm zone="shadow-limits-login_access" os="p">
97 <primary sortas="e-/etc/login.access">/etc/login.access</primary>
98 </indexterm>
99
100<screen os="q"><userinput>cp -v etc/{limits,login.access} ${LFS}/etc</userinput></screen>
101
102 <para id="shadow-login_defs" os="r">Instead of using the default
103 <emphasis>crypt</emphasis> method, use the more secure
104 <emphasis>MD5</emphasis> method of password encryption, which also allows
105 passwords longer than 8 characters. It is also necessary to change the
106 obsolete <filename class="directory">/var/spool/mail</filename> location
107 for user mailboxes that Shadow uses by default to the <filename
108 class="directory">/var/mail</filename> location used currently. Both of
109 these can be accomplished by changing the relevant configuration file
110 while copying it to its destination:</para>
111
112 <indexterm zone="shadow-login_defs" os="s">
113 <primary sortas="e-/etc/login.defs">/etc/login.defs</primary>
114 </indexterm>
115
116<screen os="t"><userinput>sed -e's@#MD5_CRYPT_ENAB.no@MD5_CRYPT_ENAB yes@' \
117 -e 's@/var/spool/mail@/var/mail@' \
118 etc/login.defs &gt; ${LFS}/etc/login.defs</userinput></screen>
119
120 <note os="u">
121 <para>If you built Shadow with Cracklib support, execute
122 this <command>sed</command> to correct the path to the Cracklib
123 dictionary:</para>
124
125<screen><userinput>cp {LFS}/etc/login.defs login.defs.orig
126sed 's@DICTPATH.*@DICTPATH\t/lib/cracklib/pw_dict@' login.defs.orig &gt; ${LFS}/etc/login.defs</userinput></screen>
127 </note>
128
129 <para os="v">Move a misplaced program to its proper location:</para>
130
131<screen os="w"><userinput>mv -v ${LFS}/usr/bin/passwd ${LFS}/bin</userinput></screen>
132
133 <para os="x">Move Shadow's dynamic libraries to a more appropriate
134 location:</para>
135
136<screen os="y"><userinput>mv -v ${LFS}/lib/libshadow.*a ${LFS}/usr/lib
137rm -v ${LFS}/lib/libshadow.so
138ln -svf ../../lib/libshadow.so.0 ${LFS}/usr/lib/libshadow.so</userinput></screen>
139
140 <para os="z">The <option>-D</option> option of the <command>useradd</command>
141 program requires the <filename class="directory">/etc/default</filename>
142 directory for it to work properly:</para>
143
144<screen os="za"><userinput>install -dv ${LFS}/etc/default</userinput></screen>
145
146 </sect2>
147
148 <sect2 id="conf-shadow" role="configuration">
149 <title>Configuring Shadow</title>
150
151 <indexterm zone="conf-shadow">
152 <primary sortas="a-Shadow">Shadow</primary>
153 <secondary>configuring</secondary>
154 </indexterm>
155
156 <para>This package contains utilities to add, modify, and delete users and
157 groups; set and change their passwords; and perform other administrative
158 tasks. For a full explanation of what <emphasis>password shadowing</emphasis>
159 means, see the <filename>doc/HOWTO</filename> file within the unpacked source
160 tree. If using Shadow support, keep in mind that programs which need to
161 verify passwords (display managers, FTP programs, pop3 daemons, etc.) must
162 be Shadow-compliant. That is, they need to be able to work with shadowed
163 passwords.</para>
164
165 <para>To enable shadowed passwords, run the following command:</para>
166
167<screen><userinput>pwconv</userinput></screen>
168
169 <para>To enable shadowed group passwords, run:</para>
170
171<screen role="nodump"><userinput>grpconv</userinput></screen>
172
173 </sect2>
174
175 <sect2 id="root-password" role="configuration">
176 <title>Setting the root password</title>
177
178 <para>Choose a password for user <systemitem
179 class="username">root</systemitem> and set it by running:</para>
180
181<screen role="nodump"><userinput>passwd root</userinput></screen>
182
183 </sect2>
184
185 <sect2 id="contents-shadow" role="content">
186 <title>Contents of Shadow</title>
187
188 <segmentedlist>
189 <segtitle>Installed programs</segtitle>
190 <segtitle>Installed libraries</segtitle>
191
192 <seglistitem>
193 <seg>chage, chfn, chpasswd, chgpasswd, chsh, expiry, faillog, gpasswd,
194 groupadd, groupdel, groupmod, grpck, grpconv, grpunconv, lastlog,
195 login, logoutd, newgrp, newusers, passwd, pwck, pwconv, pwunconv,
196 sg (link to newgrp), useradd, userdel, usermod, vigr (link to vipw),
197 and vipw</seg>
198 <seg>libshadow.[a,so]</seg>
199 </seglistitem>
200 </segmentedlist>
201
202 <variablelist>
203 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
204 <?dbfo list-presentation="list"?>
205 <?dbhtml list-presentation="table"?>
206
207 <varlistentry id="chage">
208 <term><command>chage</command></term>
209 <listitem>
210 <para>Used to change the maximum number of days between obligatory
211 password changes</para>
212 <indexterm zone="ch-system-shadow chage">
213 <primary sortas="b-chage">chage</primary>
214 </indexterm>
215 </listitem>
216 </varlistentry>
217
218 <varlistentry id="chfn">
219 <term><command>chfn</command></term>
220 <listitem>
221 <para>Used to change a user's full name and other information</para>
222 <indexterm zone="ch-system-shadow chfn">
223 <primary sortas="b-chfn">chfn</primary>
224 </indexterm>
225 </listitem>
226 </varlistentry>
227
228 <varlistentry id="chgpasswd">
229 <term><command>chgpasswd</command></term>
230 <listitem>
231 <para>Used to update group passwords in batch mode</para>
232 <indexterm zone="ch-system-shadow chgpasswd">
233 <primary sortas="b-chgpasswd">chgpasswd</primary>
234 </indexterm>
235 </listitem>
236 </varlistentry>
237
238 <varlistentry id="chpasswd">
239 <term><command>chpasswd</command></term>
240 <listitem>
241 <para>Used to update the passwords of an entire series of user
242 accounts</para>
243 <indexterm zone="ch-system-shadow chpasswd">
244 <primary sortas="b-chpasswd">chpasswd</primary>
245 </indexterm>
246 </listitem>
247 </varlistentry>
248
249 <varlistentry id="chsh">
250 <term><command>chsh</command></term>
251 <listitem>
252 <para>Used to change a user's default login shell</para>
253 <indexterm zone="ch-system-shadow chsh">
254 <primary sortas="b-chsh">chsh</primary>
255 </indexterm>
256 </listitem>
257 </varlistentry>
258
259 <varlistentry id="expiry">
260 <term><command>expiry</command></term>
261 <listitem>
262 <para>Checks and enforces the current password expiration policy</para>
263 <indexterm zone="ch-system-shadow expiry">
264 <primary sortas="b-expiry">expiry</primary>
265 </indexterm>
266 </listitem>
267 </varlistentry>
268
269 <varlistentry id="faillog">
270 <term><command>faillog</command></term>
271 <listitem>
272 <para>Is used to examine the log of login failures, to set a maximum
273 number of failures before an account is blocked, or to reset the
274 failure count</para>
275 <indexterm zone="ch-system-shadow faillog">
276 <primary sortas="b-faillog">faillog</primary>
277 </indexterm>
278 </listitem>
279 </varlistentry>
280
281 <varlistentry id="gpasswd">
282 <term><command>gpasswd</command></term>
283 <listitem>
284 <para>Is used to add and delete members and administrators to
285 groups</para>
286 <indexterm zone="ch-system-shadow gpasswd">
287 <primary sortas="b-gpasswd">gpasswd</primary>
288 </indexterm>
289 </listitem>
290 </varlistentry>
291
292 <varlistentry id="groupadd">
293 <term><command>groupadd</command></term>
294 <listitem>
295 <para>Creates a group with the given name</para>
296 <indexterm zone="ch-system-shadow groupadd">
297 <primary sortas="b-groupadd">groupadd</primary>
298 </indexterm>
299 </listitem>
300 </varlistentry>
301
302 <varlistentry id="groupdel">
303 <term><command>groupdel</command></term>
304 <listitem>
305 <para>Deletes the group with the given name</para>
306 <indexterm zone="ch-system-shadow groupdel">
307 <primary sortas="b-groupdel">groupdel</primary>
308 </indexterm>
309 </listitem>
310 </varlistentry>
311
312 <varlistentry id="groupmod">
313 <term><command>groupmod</command></term>
314 <listitem>
315 <para>Is used to modify the given group's name or GID</para>
316 <indexterm zone="ch-system-shadow groupmod">
317 <primary sortas="b-groupmod">groupmod</primary>
318 </indexterm>
319 </listitem>
320 </varlistentry>
321
322 <varlistentry id="grpck">
323 <term><command>grpck</command></term>
324 <listitem>
325 <para>Verifies the integrity of the group files
326 <filename>/etc/group</filename> and
327 <filename>/etc/gshadow</filename></para>
328 <indexterm zone="ch-system-shadow grpck">
329 <primary sortas="b-grpck">grpck</primary>
330 </indexterm>
331 </listitem>
332 </varlistentry>
333
334 <varlistentry id="grpconv">
335 <term><command>grpconv</command></term>
336 <listitem>
337 <para>Creates or updates the shadow group file from the normal
338 group file</para>
339 <indexterm zone="ch-system-shadow grpconv">
340 <primary sortas="b-grpconv">grpconv</primary>
341 </indexterm>
342 </listitem>
343 </varlistentry>
344
345 <varlistentry id="grpunconv">
346 <term><command>grpunconv</command></term>
347 <listitem>
348 <para>Updates <filename>/etc/group</filename> from
349 <filename>/etc/gshadow</filename> and then deletes the latter</para>
350 <indexterm zone="ch-system-shadow grpunconv">
351 <primary sortas="b-grpunconv">grpunconv</primary>
352 </indexterm>
353 </listitem>
354 </varlistentry>
355
356 <varlistentry id="lastlog">
357 <term><command>lastlog</command></term>
358 <listitem>
359 <para>Reports the most recent login of all users or of a
360 given user</para>
361 <indexterm zone="ch-system-shadow lastlog">
362 <primary sortas="b-lastlog">lastlog</primary>
363 </indexterm>
364 </listitem>
365 </varlistentry>
366
367 <varlistentry id="login">
368 <term><command>login</command></term>
369 <listitem>
370 <para>Is used by the system to let users sign on</para>
371 <indexterm zone="ch-system-shadow login">
372 <primary sortas="b-login">login</primary>
373 </indexterm>
374 </listitem>
375 </varlistentry>
376
377 <varlistentry id="logoutd">
378 <term><command>logoutd</command></term>
379 <listitem>
380 <para>Is a daemon used to enforce restrictions on log-on time
381 and ports</para>
382 <indexterm zone="ch-system-shadow logoutd">
383 <primary sortas="b-logoutd">logoutd</primary>
384 </indexterm>
385 </listitem>
386 </varlistentry>
387
388 <varlistentry id="newgrp">
389 <term><command>newgrp</command></term>
390 <listitem>
391 <para>Is used to change the current GID during a login session</para>
392 <indexterm zone="ch-system-shadow newgrp">
393 <primary sortas="b-newgrp">newgrp</primary>
394 </indexterm>
395 </listitem>
396 </varlistentry>
397
398 <varlistentry id="newusers">
399 <term><command>newusers</command></term>
400 <listitem>
401 <para>Is used to create or update an entire series of user
402 accounts</para>
403 <indexterm zone="ch-system-shadow newusers">
404 <primary sortas="b-newusers">newusers</primary>
405 </indexterm>
406 </listitem>
407 </varlistentry>
408
409 <varlistentry id="passwd">
410 <term><command>passwd</command></term>
411 <listitem>
412 <para>Is used to change the password for a user or group account</para>
413 <indexterm zone="ch-system-shadow passwd">
414 <primary sortas="b-passwd">passwd</primary>
415 </indexterm>
416 </listitem>
417 </varlistentry>
418
419 <varlistentry id="pwck">
420 <term><command>pwck</command></term>
421 <listitem>
422 <para>Verifies the integrity of the password files
423 <filename>/etc/passwd</filename> and
424 <filename>/etc/shadow</filename></para>
425 <indexterm zone="ch-system-shadow pwck">
426 <primary sortas="b-pwck">pwck</primary>
427 </indexterm>
428 </listitem>
429 </varlistentry>
430
431 <varlistentry id="pwconv">
432 <term><command>pwconv</command></term>
433 <listitem>
434 <para>Creates or updates the shadow password file from the normal
435 password file</para>
436 <indexterm zone="ch-system-shadow pwconv">
437 <primary sortas="b-pwconv">pwconv</primary>
438 </indexterm>
439 </listitem>
440 </varlistentry>
441
442 <varlistentry id="pwunconv">
443 <term><command>pwunconv</command></term>
444 <listitem>
445 <para>Updates <filename>/etc/passwd</filename> from
446 <filename>/etc/shadow</filename> and then deletes the latter</para>
447 <indexterm zone="ch-system-shadow pwunconv">
448 <primary sortas="b-pwunconv">pwunconv</primary>
449 </indexterm>
450 </listitem>
451 </varlistentry>
452
453 <varlistentry id="sg">
454 <term><command>sg</command></term>
455 <listitem>
456 <para>Executes a given command while the user's GID
457 is set to that of the given group</para>
458 <indexterm zone="ch-system-shadow sg">
459 <primary sortas="b-sg">sg</primary>
460 </indexterm>
461 </listitem>
462 </varlistentry>
463
464 <varlistentry id="su">
465 <term><command>su</command></term>
466 <listitem>
467 <para>Runs a shell with substitute user and group IDs</para>
468 <indexterm zone="ch-system-shadow su">
469 <primary sortas="b-su">su</primary>
470 </indexterm>
471 </listitem>
472 </varlistentry>
473
474 <varlistentry id="useradd">
475 <term><command>useradd</command></term>
476 <listitem>
477 <para>Creates a new user with the given name, or updates the default
478 new-user information</para>
479 <indexterm zone="ch-system-shadow useradd">
480 <primary sortas="b-useradd">useradd</primary>
481 </indexterm>
482 </listitem>
483 </varlistentry>
484
485 <varlistentry id="userdel">
486 <term><command>userdel</command></term>
487 <listitem>
488 <para>Deletes the given user account</para>
489 <indexterm zone="ch-system-shadow userdel">
490 <primary sortas="b-userdel">userdel</primary>
491 </indexterm>
492 </listitem>
493 </varlistentry>
494
495 <varlistentry id="usermod">
496 <term><command>usermod</command></term>
497 <listitem>
498 <para>Is used to modify the given user's login name, User
499 Identification (UID), shell, initial group, home directory, etc.</para>
500 <indexterm zone="ch-system-shadow usermod">
501 <primary sortas="b-usermod">usermod</primary>
502 </indexterm>
503 </listitem>
504 </varlistentry>
505
506 <varlistentry id="vigr">
507 <term><command>vigr</command></term>
508 <listitem>
509 <para>Edits the <filename>/etc/group</filename> or
510 <filename>/etc/gshadow</filename> files</para>
511 <indexterm zone="ch-system-shadow vigr">
512 <primary sortas="b-vigr">vigr</primary>
513 </indexterm>
514 </listitem>
515 </varlistentry>
516
517 <varlistentry id="vipw">
518 <term><command>vipw</command></term>
519 <listitem>
520 <para>Edits the <filename>/etc/passwd</filename> or
521 <filename>/etc/shadow</filename> files</para>
522 <indexterm zone="ch-system-shadow vipw">
523 <primary sortas="b-vipw">vipw</primary>
524 </indexterm>
525 </listitem>
526 </varlistentry>
527
528 <varlistentry id="libshadow">
529 <term><filename class="libraryfile">libshadow</filename></term>
530 <listitem>
531 <para>Contains functions used by most programs in this package</para>
532 <indexterm zone="ch-system-shadow libshadow">
533 <primary sortas="c-libshadow">libshadow</primary>
534 </indexterm>
535 </listitem>
536 </varlistentry>
537
538 </variablelist>
539
540 </sect2>
541
542</sect1>
Note: See TracBrowser for help on using the repository browser.