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

clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 8b09bef was 9d47629, checked in by William Harrington <kb0iic@…>, 12 years ago

Update shadow page for groups program and man-pages.

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