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

clfs-1.2clfs-2.1clfs-3.0.0-systemdclfs-3.0.0-sysvinitsystemdsysvinit
Last change on this file since 1ac2d0c was 61ad0b7f, checked in by Chris Staub <chris@…>, 14 years ago

Added installed directory info for a number of packages

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