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

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

r3880@server: jim | 2006-06-09 13:27:18 -0700
Updates to Shadow 4.0.16 build instructions

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