source: final-system/common/shadow.xml @ 9bfef72

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

r2699@server (orig r1315): manuel | 2006-03-23 11:35:03 -0800
Added a few nodump attributes to final-system chapter files.

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