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

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

Text updates

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