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

clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since b8765f3 was e13155d, checked in by Jonathan Norman <jon@…>, 13 years ago

Added --without-nscd to Shadow

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