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

sysvinit
Last change on this file since d4f9e43 was b45cbb3, checked in by Chris Staub <chris@…>, 10 years ago

Minor text fixes

  • Property mode set to 100644
File size: 17.5 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"/>
[fc44790]31 for installing Cracklib prior to building Shadow. After Cracklib is
32 installed, execute this <command>sed</command> in Shadow's source
33 directory to correct the path to the Cracklib dictionary:</para>
34
35<screen role="nodump"><userinput>sed -i 's@\(DICTPATH.\).*@\1/lib/cracklib/pw_dict@' etc/login.defs</userinput></screen>
36
37 <para>Finally, add <parameter>--with-libcrack</parameter> to the
38 <command>configure</command> command below.</para>
39
[3f8be484]40 </note>
41
[0a6ea84]42 <para os="b">Disable the installation of the <command>groups</command> and
43 <command>nologin</command> programs and their man pages, as better versions
44 of these programs are provided by Coreutils and Util-linux:</para>
[9d47629]45
[0a6ea84]46<screen os="c"><userinput>sed -i src/Makefile.in \
47 -e 's/groups$(EXEEXT) //' -e 's/= nologin$(EXEEXT)/= /'
48find man -name Makefile.in -exec sed -i \
49 -e 's/man1\/groups\.1 //' -e 's/man8\/nologin\.8 //' '{}' \;</userinput></screen>
[9d47629]50
51 <para os="d">Prepare Shadow for compilation:</para>
[7447a2c]52
[9d47629]53<screen os="e"><userinput>./configure --sysconfdir=/etc</userinput></screen>
[7447a2c]54
[b45cbb3]55<para os="f">The meaning of the new configure option:</para>
[9d47629]56
57 <variablelist os="g">
[2ae76c7c]58 <varlistentry>
59 <term><parameter>--sysconfdir=/etc</parameter></term>
60 <listitem><para>Tells Shadow to install its configuration files into
[7bca962]61 <filename class="directory">/etc</filename>, rather than
62 <filename class="directory">/usr/etc</filename>.</para></listitem>
[2ae76c7c]63 </varlistentry>
[24b004c]64
[7447a2c]65 </variablelist>
66
67 <para os="h">Compile the package:</para>
[3f8be484]68
[7447a2c]69<screen os="i"><userinput>make</userinput></screen>
[3f8be484]70
[d1631d1]71 <para os="j">This package does not come with a test suite.</para>
[3f8be484]72
[d1631d1]73 <para os="k">Install the package:</para>
[3f8be484]74
[d1631d1]75<screen os="l"><userinput>make install</userinput></screen>
76
[898e550]77 <para os="m" id="shadow-login_defs">Instead of using the default
[b2fdfa1]78 <emphasis>DES</emphasis> method, use the more secure
[51129d2]79 <emphasis>SHA512</emphasis> method of password encryption, which also allows
[3f8be484]80 passwords longer than 8 characters. It is also necessary to change the
81 obsolete <filename class="directory">/var/spool/mail</filename> location
82 for user mailboxes that Shadow uses by default to the <filename
[a1fb12f]83 class="directory">/var/mail</filename> location used currently. Use the
84 following sed command to make these changes to the appropriate
85 configuration file:</para>
[3f8be484]86
[898e550]87 <indexterm os="n" zone="shadow-login_defs">
[3f8be484]88 <primary sortas="e-/etc/login.defs">/etc/login.defs</primary>
89 </indexterm>
90
[38fcb2c]91<screen os="s"><userinput>sed -i /etc/login.defs \
[51129d2]92 -e 's@#\(ENCRYPT_METHOD \).*@\1SHA512@' \
[38fcb2c]93 -e 's@/var/spool/mail@/var/mail@'</userinput></screen>
[81118fc]94
[fc44790]95 <para os="t">Move a misplaced program to its proper location:</para>
[3f8be484]96
[fc44790]97<screen os="u"><userinput>mv -v /usr/bin/passwd /bin</userinput></screen>
[3f8be484]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
[3a3e135]124<screen role="nodump"><userinput>grpconv</userinput></screen>
[3f8be484]125
[a1fb12f]126 <para>To view or change the default settings for new user accounts that
[d67d6bd]127 you create, you can edit <filename>/etc/default/useradd</filename>. See
[a1fb12f]128 <command>man useradd</command> or
[48770b9]129 <ulink url="&cblfs-root;index.php/Configuring_for_Adding_Users"/> for more
[a1fb12f]130 information.</para>
131
[3f8be484]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
[0f3854e]140<screen role="nodump"><userinput>passwd root</userinput></screen>
[3f8be484]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>
[61ad0b7f]149 <segtitle>Installed directory</segtitle>
[3f8be484]150
151 <seglistitem>
[d1f79ab]152 <seg>chage, chfn, chgpasswd, chpasswd, chsh, expiry, faillog, gpasswd,
[0a11182]153 groupadd, groupdel, groupmems, groupmod, grpck, grpconv, grpunconv,
[0a6ea84]154 lastlog, login, logoutd, newgrp, newusers, passwd, pwck,
[0a11182]155 pwconv, pwunconv, sg (link to newgrp), su, useradd, userdel, usermod,
[c2102b28]156 vigr (link to vipw), vipw</seg>
[61ad0b7f]157 <seg>/etc/default</seg>
[3f8be484]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
[a68b59e]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
[3f8be484]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
[0a11182]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
[3f8be484]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="passwd">
380 <term><command>passwd</command></term>
381 <listitem>
382 <para>Is used to change the password for a user or group account</para>
383 <indexterm zone="ch-system-shadow passwd">
384 <primary sortas="b-passwd">passwd</primary>
385 </indexterm>
386 </listitem>
387 </varlistentry>
388
389 <varlistentry id="pwck">
390 <term><command>pwck</command></term>
391 <listitem>
392 <para>Verifies the integrity of the password files
393 <filename>/etc/passwd</filename> and
394 <filename>/etc/shadow</filename></para>
395 <indexterm zone="ch-system-shadow pwck">
396 <primary sortas="b-pwck">pwck</primary>
397 </indexterm>
398 </listitem>
399 </varlistentry>
400
401 <varlistentry id="pwconv">
402 <term><command>pwconv</command></term>
403 <listitem>
404 <para>Creates or updates the shadow password file from the normal
405 password file</para>
406 <indexterm zone="ch-system-shadow pwconv">
407 <primary sortas="b-pwconv">pwconv</primary>
408 </indexterm>
409 </listitem>
410 </varlistentry>
411
412 <varlistentry id="pwunconv">
413 <term><command>pwunconv</command></term>
414 <listitem>
415 <para>Updates <filename>/etc/passwd</filename> from
416 <filename>/etc/shadow</filename> and then deletes the latter</para>
417 <indexterm zone="ch-system-shadow pwunconv">
418 <primary sortas="b-pwunconv">pwunconv</primary>
419 </indexterm>
420 </listitem>
421 </varlistentry>
422
423 <varlistentry id="sg">
424 <term><command>sg</command></term>
425 <listitem>
426 <para>Executes a given command while the user's GID
427 is set to that of the given group</para>
428 <indexterm zone="ch-system-shadow sg">
429 <primary sortas="b-sg">sg</primary>
430 </indexterm>
431 </listitem>
432 </varlistentry>
433
434 <varlistentry id="su">
435 <term><command>su</command></term>
436 <listitem>
437 <para>Runs a shell with substitute user and group IDs</para>
438 <indexterm zone="ch-system-shadow su">
439 <primary sortas="b-su">su</primary>
440 </indexterm>
441 </listitem>
442 </varlistentry>
443
444 <varlistentry id="useradd">
445 <term><command>useradd</command></term>
446 <listitem>
447 <para>Creates a new user with the given name, or updates the default
448 new-user information</para>
449 <indexterm zone="ch-system-shadow useradd">
450 <primary sortas="b-useradd">useradd</primary>
451 </indexterm>
452 </listitem>
453 </varlistentry>
454
455 <varlistentry id="userdel">
456 <term><command>userdel</command></term>
457 <listitem>
458 <para>Deletes the given user account</para>
459 <indexterm zone="ch-system-shadow userdel">
460 <primary sortas="b-userdel">userdel</primary>
461 </indexterm>
462 </listitem>
463 </varlistentry>
464
465 <varlistentry id="usermod">
466 <term><command>usermod</command></term>
467 <listitem>
468 <para>Is used to modify the given user's login name, User
469 Identification (UID), shell, initial group, home directory, etc.</para>
470 <indexterm zone="ch-system-shadow usermod">
471 <primary sortas="b-usermod">usermod</primary>
472 </indexterm>
473 </listitem>
474 </varlistentry>
475
476 <varlistentry id="vigr">
477 <term><command>vigr</command></term>
478 <listitem>
479 <para>Edits the <filename>/etc/group</filename> or
480 <filename>/etc/gshadow</filename> files</para>
481 <indexterm zone="ch-system-shadow vigr">
482 <primary sortas="b-vigr">vigr</primary>
483 </indexterm>
484 </listitem>
485 </varlistentry>
486
487 <varlistentry id="vipw">
488 <term><command>vipw</command></term>
489 <listitem>
490 <para>Edits the <filename>/etc/passwd</filename> or
491 <filename>/etc/shadow</filename> files</para>
492 <indexterm zone="ch-system-shadow vipw">
493 <primary sortas="b-vipw">vipw</primary>
494 </indexterm>
495 </listitem>
496 </varlistentry>
497
498 </variablelist>
499
500 </sect2>
501
502</sect1>
Note: See TracBrowser for help on using the repository browser.