source: final-system/common/shadow.xml@ 8eef3f6

Last change on this file since 8eef3f6 was 2659c74, checked in by Jim Gifford <clfs@…>, 19 years ago

r677@server (orig r675): manuel | 2005-11-10 03:13:57 -0800
Including patches.ent from general.ent

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