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

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

Added description for sysconfdir switch in shadow instructions

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