source: final-system/common/shadow.xml@ fcb8a924

Last change on this file since fcb8a924 was ede92d9, checked in by Jim Gifford <clfs@…>, 19 years ago

r1119@server (orig r1117): chris | 2006-01-31 17:59:55 -0800
Updated package dependencies

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