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

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since f4a3466 was 8ec31e6, checked in by Chris Staub <chris@…>, 16 years ago

Shadow no longer installs libraries

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