source: clfs-sysroot/BOOK/final-system/common/shadow.xml@ beea2b3

Last change on this file since beea2b3 was cee2ca2, checked in by Joe Ciccone <jciccone@…>, 18 years ago

Went through and made sure that every package in the final system that needs both --build and --host has them.

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