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

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 1cc38fe was 4c51b38, checked in by Jonathan Norman <jon@…>, 13 years ago

Removed grep patch and updated shadow to 4.1.4.3.

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