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

clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 6ecbe33 was 51129d2, checked in by William Harrington <kb0iic@…>, 12 years ago

Remove unneccessary russian man page commands and use SHA512 for encrypt method and edit configure command.

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