source: BOOK/final-system/common/shadow.xml @ a68b59e

clfs-1.2clfs-2.1clfs-3.0.0-systemdclfs-3.0.0-sysvinitsystemdsysvinit
Last change on this file since a68b59e was a68b59e, checked in by Jim Gifford <clfs@…>, 18 years ago

r3795@server (orig r1715): chris | 2006-05-31 21:54:59 -0700
Updated lists of installed programs

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