source: final-system/common/shadow.xml@ 62ceb05

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

r803@server (orig r801): jim | 2005-12-02 08:36:39 -0800

r880@server: jim | 2005-12-02 08:36:09 -0800
Text Updates from G. Moko


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