source: BOOK/final-system/common/shadow.xml@ 0408d56

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 0408d56 was 48770b9, checked in by Joe Ciccone <jciccone@…>, 17 years ago

Fix Typo.

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