source: chapter06/shadow.xml@ c321cf4

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 6.3 6.4 6.5 6.6 6.7 6.8 7.0 7.1 7.2 7.3 7.4 7.5 7.5-systemd 7.6 7.6-systemd 7.7 7.7-systemd 7.8 7.8-systemd 7.9 7.9-systemd 8.0 8.1 8.2 8.3 8.4 9.0 9.1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since c321cf4 was ef9aabc, checked in by Matthew Burgess <matthew@…>, 18 years ago

Remove an outdated comment about having to reset passwords if enabling password shadowing.

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

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