source: final-system/common/shadow.xml@ 6003b158

Last change on this file since 6003b158 was e8d4634, checked in by Chris Staub <chris@…>, 18 years ago

Added description for sysconfdir switch in shadow instructions

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