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

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

Removed unneeded configure options from Shadow instructions

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