source: chapter06/shadow.xml@ 8f97096

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 6.1 6.1.1 6.3 6.4 6.5 6.6 6.7 6.8 7.0 7.1 7.2 7.3 7.4 7.5 7.5-systemd 7.6 7.6-systemd 7.7 7.7-systemd 7.8 7.8-systemd 7.9 7.9-systemd 8.0 8.1 8.2 8.3 8.4 9.0 9.1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 8f97096 was 8f97096, checked in by Manuel Canales Esparcia <manuel@…>, 19 years ago

Changed the Short Descriptions sections to table format for XHTML output.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@4677 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 14.6 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
3 <!ENTITY % general-entities SYSTEM "../general.ent">
4 %general-entities;
5]>
6<sect1 id="ch-system-shadow" role="wrap">
7<title>Shadow-&shadow-version;</title>
8<?dbhtml filename="shadow.html"?>
9
10<indexterm zone="ch-system-shadow"><primary sortas="a-Shadow">Shadow</primary></indexterm>
11
12<sect2 role="package"><title/>
13<para>The Shadow package contains programs for handling passwords in a secure
14way.</para>
15
16<segmentedlist>
17<segtitle>&buildtime;</segtitle>
18<segtitle>&diskspace;</segtitle>
19<seglistitem><seg>0.4 SBU</seg><seg>11 MB</seg></seglistitem>
20</segmentedlist>
21
22<segmentedlist>
23<segtitle>Shadow installation depends on</segtitle>
24<seglistitem><seg>Bash, Binutils, Bison, Coreutils,
25Diffutils, GCC, Gettext, Glibc, Grep, Make, and Sed</seg></seglistitem>
26</segmentedlist>
27</sect2>
28
29<sect2 role="installation">
30<title>Installation of Shadow</title>
31
32<para>Prepare Shadow for compilation:</para>
33
34<screen><userinput>./configure --libdir=/lib --enable-shared</userinput></screen>
35
36<para>Remove the installation of the <command>groups</command> program, and its man page as
37Coreutils provides a better version:</para>
38
39<screen><userinput>sed -i 's/groups$(EXEEXT) //' src/Makefile
40sed -i '/groups/d' man/Makefile</userinput></screen>
41
42<para>Compile the package:</para>
43
44<screen><userinput>make</userinput></screen>
45
46<para>Install the package:</para>
47
48<screen><userinput>make install</userinput></screen>
49
50<para id="shadow-limits-login_access">Shadow uses two files to configure
51authentication settings for the system. Install these two config files:</para>
52
53<indexterm zone="shadow-limits-login_access"><primary sortas="e-/etc/limits">/etc/limits</primary></indexterm>
54<indexterm zone="shadow-limits-login_access"><primary sortas="e-/etc/login.access">/etc/login.access</primary></indexterm>
55
56<screen><userinput>cp etc/{limits,login.access} /etc</userinput></screen>
57
58<para id="shadow-login_defs">Instead of using the default <emphasis>crypt</emphasis> method,
59use the more secure <emphasis>MD5</emphasis> method of password
60encryption, which also allows passwords longer than 8 characters. It
61is also necessary to change the obsolete <filename
62class="directory">/var/spool/mail</filename> location for user
63mailboxes that Shadow uses by default to the <filename
64class="directory">/var/mail</filename> location used currently. Both
65of these can be accomplished by changing the relevant configuration
66file while copying it to its destination:</para>
67
68<indexterm zone="shadow-login_defs"><primary sortas="e-/etc/login.defs">/etc/login.defs</primary></indexterm>
69
70<screen><userinput>sed -e's@#MD5_CRYPT_ENAB.no@MD5_CRYPT_ENAB yes@' \
71 -e 's@/var/spool/mail@/var/mail@' \
72 etc/login.defs.linux &gt; /etc/login.defs</userinput></screen>
73
74<para>Move a misplaced program to its proper location:</para>
75
76<screen><userinput>mv /usr/bin/passwd /bin</userinput></screen>
77
78<para>Move Shadow's libraries to more appropriate locations:</para>
79
80<screen><userinput>mv /lib/libshadow.*a /usr/lib
81rm /lib/libshadow.so
82ln -sf ../../lib/libshadow.so.0 /usr/lib/libshadow.so</userinput></screen>
83
84<para>The <parameter>-D</parameter> option of the
85<command>useradd</command> program requires the <filename
86class="directory">/etc/default</filename> directory for it to work
87properly:</para>
88
89<screen><userinput>mkdir /etc/default</userinput></screen>
90
91</sect2>
92
93
94<sect2 id="conf-shadow" role="configuration"><title>Configuring Shadow</title>
95<indexterm zone="conf-shadow">
96<primary sortas="a-Shadow">Shadow</primary>
97<secondary>configuring</secondary></indexterm>
98
99<para>This package contains utilities to add, modify, and delete users
100and groups; set and change their passwords; and perform other
101administrative tasks. For a full explanation of what
102<emphasis>password shadowing</emphasis> means, see the
103<filename>doc/HOWTO</filename> file within the unpacked source tree.
104If using Shadow support, keep in mind that programs which need to
105verify passwords (display managers, FTP programs, pop3 daemons, etc.)
106must be shadow-compliant. That is, they need to be able to work with
107shadowed passwords.</para>
108
109<para>To enable shadowed passwords, run the following command:</para>
110
111<screen><userinput>pwconv</userinput></screen>
112
113<para>To enable shadowed group passwords, run:</para>
114
115<screen><userinput>grpconv</userinput></screen>
116
117<para>Under normal circumstances, passwords will not have been created
118yet. However, if returning to this section later to enable shadowing,
119reset any current user passwords with the <command>passwd</command>
120command or any group passwords with the <command>gpasswd</command>
121command.</para>
122
123</sect2>
124
125
126<sect2 role="configuration">
127<title>Setting the root password</title>
128
129<para>Choose a password for user <emphasis>root</emphasis> and set it
130by running:</para>
131
132<screen><userinput>passwd root</userinput></screen>
133</sect2>
134
135
136<sect2 id="contents-shadow" role="content"><title>Contents of Shadow</title>
137
138<segmentedlist>
139<segtitle>Installed programs</segtitle>
140<segtitle>Installed libraries</segtitle>
141<seglistitem><seg>chage, chfn, chpasswd, chsh, expiry, faillog, gpasswd,
142groupadd, groupdel, groupmod, groups, grpck, grpconv, grpunconv, lastlog, login,
143logoutd, mkpasswd, newgrp, newusers, passwd, pwck, pwconv, pwunconv, sg
144(link to newgrp), useradd, userdel, usermod, vigr (link to vipw), and vipw</seg>
145<seg>libshadow[.a,so]</seg>
146</seglistitem>
147</segmentedlist>
148
149<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
150<?dbfo list-presentation="list"?>
151<?dbhtml list-presentation="table"?>
152
153<varlistentry id="chage">
154<term><command>chage</command></term>
155<listitem>
156<para>Used to change the maximum number of days between obligatory
157password changes</para>
158<indexterm zone="ch-system-shadow chage"><primary sortas="b-chage">chage</primary></indexterm>
159</listitem>
160</varlistentry>
161
162<varlistentry id="chfn">
163<term><command>chfn</command></term>
164<listitem>
165<para>Used to change a user's full name and other info</para>
166<indexterm zone="ch-system-shadow chfn"><primary sortas="b-chfn">chfn</primary></indexterm>
167</listitem>
168</varlistentry>
169
170<varlistentry id="chpasswd">
171<term><command>chpasswd</command></term>
172<listitem>
173<para>Used to update the passwords of an entire series of user
174accounts</para>
175<indexterm zone="ch-system-shadow chpasswd"><primary sortas="b-chpasswd">chpasswd</primary></indexterm>
176</listitem>
177</varlistentry>
178
179<varlistentry id="chsh">
180<term><command>chsh</command></term>
181<listitem>
182<para>Used to change a user's default login shell</para>
183<indexterm zone="ch-system-shadow chsh"><primary sortas="b-chsh">chsh</primary></indexterm>
184</listitem>
185</varlistentry>
186
187<varlistentry id="expiry">
188<term><command>expiry</command></term>
189<listitem>
190<para>Checks and enforces the current password expiration policy</para>
191<indexterm zone="ch-system-shadow expiry"><primary sortas="b-expiry">expiry</primary></indexterm>
192</listitem>
193</varlistentry>
194
195<varlistentry id="faillog">
196<term><command>faillog</command></term>
197<listitem>
198<para>Is used to examine the log of login failures, to set a maximum number of
199failures before an account is blocked, or to reset the failure count</para>
200<indexterm zone="ch-system-shadow faillog"><primary sortas="b-faillog">faillog</primary></indexterm>
201</listitem>
202</varlistentry>
203
204<varlistentry id="gpasswd">
205<term><command>gpasswd</command></term>
206<listitem>
207<para>Is used to add and delete members and administrators to groups</para>
208<indexterm zone="ch-system-shadow gpasswd"><primary sortas="b-gpasswd">gpasswd</primary></indexterm>
209</listitem>
210</varlistentry>
211
212<varlistentry id="groupadd">
213<term><command>groupadd</command></term>
214<listitem>
215<para>Creates a group with the given name</para>
216<indexterm zone="ch-system-shadow groupadd"><primary sortas="b-groupadd">groupadd</primary></indexterm>
217</listitem>
218</varlistentry>
219
220<varlistentry id="groupdel">
221<term><command>groupdel</command></term>
222<listitem>
223<para>Deletes the group with the given name</para>
224<indexterm zone="ch-system-shadow groupdel"><primary sortas="b-groupdel">groupdel</primary></indexterm>
225</listitem>
226</varlistentry>
227
228<varlistentry id="groupmod">
229<term><command>groupmod</command></term>
230<listitem>
231<para>Is used to modify the given group's name or GID</para>
232<indexterm zone="ch-system-shadow groupmod"><primary sortas="b-groupmod">groupmod</primary></indexterm>
233</listitem>
234</varlistentry>
235
236<varlistentry id="groups">
237<term><command>groups</command></term>
238<listitem>
239<para>Reports the groups of which the given users are members</para>
240<indexterm zone="ch-system-shadow groups"><primary sortas="b-groups">groups</primary></indexterm>
241</listitem>
242</varlistentry>
243
244<varlistentry id="grpck">
245<term><command>grpck</command></term>
246<listitem>
247<para>Verifies the integrity of the group files <filename>/etc/group</filename>
248and <filename>/etc/gshadow</filename></para>
249<indexterm zone="ch-system-shadow grpck"><primary sortas="b-grpck">grpck</primary></indexterm>
250</listitem>
251</varlistentry>
252
253<varlistentry id="grpconv">
254<term><command>grpconv</command></term>
255<listitem>
256<para>Creates or updates the shadow group file from the normal group file</para>
257<indexterm zone="ch-system-shadow grpconv"><primary sortas="b-grpconv">grpconv</primary></indexterm>
258</listitem>
259</varlistentry>
260
261<varlistentry id="grpunconv">
262<term><command>grpunconv</command></term>
263<listitem>
264<para>Updates <filename>/etc/group</filename>
265from <filename>/etc/gshadow</filename> and then deletes the latter</para>
266<indexterm zone="ch-system-shadow grpunconv"><primary sortas="b-grpunconv">grpunconv</primary></indexterm>
267</listitem>
268</varlistentry>
269
270<varlistentry id="lastlog">
271<term><command>lastlog</command></term>
272<listitem>
273<para>Reports the most recent login of all users or of a given user</para>
274<indexterm zone="ch-system-shadow lastlog"><primary sortas="b-lastlog">lastlog</primary></indexterm>
275</listitem>
276</varlistentry>
277
278<varlistentry id="login">
279<term><command>login</command></term>
280<listitem>
281<para>Is used by the system to let users sign on</para>
282<indexterm zone="ch-system-shadow login"><primary sortas="b-login">login</primary></indexterm>
283</listitem>
284</varlistentry>
285
286<varlistentry id="logoutd">
287<term><command>logoutd</command></term>
288<listitem>
289<para>Is a daemon used to enforce restrictions on log-on time and ports</para>
290<indexterm zone="ch-system-shadow logoutd"><primary sortas="b-logoutd">logoutd</primary></indexterm>
291</listitem>
292</varlistentry>
293
294<varlistentry id="mkpasswd">
295<term><command>mkpasswd</command></term>
296<listitem>
297<para>Generates random passwords</para>
298<indexterm zone="ch-system-shadow mkpasswd"><primary sortas="b-mkpasswd">mkpasswd</primary></indexterm>
299</listitem>
300</varlistentry>
301
302<varlistentry id="newgrp">
303<term><command>newgrp</command></term>
304<listitem>
305<para>Is used to change the current GID during a login session</para>
306<indexterm zone="ch-system-shadow newgrp"><primary sortas="b-newgrp">newgrp</primary></indexterm>
307</listitem>
308</varlistentry>
309
310<varlistentry id="newusers">
311<term><command>newusers</command></term>
312<listitem>
313<para>Is used to create or update an entire series of user accounts</para>
314<indexterm zone="ch-system-shadow newusers"><primary sortas="b-newusers">newusers</primary></indexterm>
315</listitem>
316</varlistentry>
317
318<varlistentry id="passwd">
319<term><command>passwd</command></term>
320<listitem>
321<para>Is used to change the password for a user or group account</para>
322<indexterm zone="ch-system-shadow passwd"><primary sortas="b-passwd">passwd</primary></indexterm>
323</listitem>
324</varlistentry>
325
326<varlistentry id="pwck">
327<term><command>pwck</command></term>
328<listitem>
329<para>Verifies the integrity of the password files
330<filename>/etc/passwd</filename> and <filename>/etc/shadow</filename></para>
331<indexterm zone="ch-system-shadow pwck"><primary sortas="b-pwck">pwck</primary></indexterm>
332</listitem>
333</varlistentry>
334
335<varlistentry id="pwconv">
336<term><command>pwconv</command></term>
337<listitem>
338<para>Creates or updates the shadow password file from the normal
339password file</para>
340<indexterm zone="ch-system-shadow pwconv"><primary sortas="b-pwconv">pwconv</primary></indexterm>
341</listitem>
342</varlistentry>
343
344<varlistentry id="pwunconv">
345<term><command>pwunconv</command></term>
346<listitem>
347<para>Updates <filename>/etc/passwd</filename>
348from <filename>/etc/shadow</filename> and then deletes the latter</para>
349<indexterm zone="ch-system-shadow pwunconv"><primary sortas="b-pwunconv">pwunconv</primary></indexterm>
350</listitem>
351</varlistentry>
352
353<varlistentry id="sg">
354<term><command>sg</command></term>
355<listitem>
356<para>Executes a given command while the user's GID
357is set to that of the given group</para>
358<indexterm zone="ch-system-shadow sg"><primary sortas="b-sg">sg</primary></indexterm>
359</listitem>
360</varlistentry>
361
362<varlistentry id="su">
363<term><command>su</command></term>
364<listitem>
365<indexterm zone="ch-system-shadow su"><primary sortas="b-su">su</primary></indexterm>
366<para>Runs a shell with substitute user and group IDs</para>
367</listitem>
368</varlistentry>
369
370<varlistentry id="useradd">
371<term><command>useradd</command></term>
372<listitem>
373<para>Creates a new user with the given name, or updates the default
374new-user information</para>
375<indexterm zone="ch-system-shadow useradd"><primary sortas="b-useradd">useradd</primary></indexterm>
376</listitem>
377</varlistentry>
378
379<varlistentry id="userdel">
380<term><command>userdel</command></term>
381<listitem>
382<para>Deletes the given user account</para>
383<indexterm zone="ch-system-shadow userdel"><primary sortas="b-userdel">userdel</primary></indexterm>
384</listitem>
385</varlistentry>
386
387<varlistentry id="usermod">
388<term><command>usermod</command></term>
389<listitem>
390<para>Is used to modify the given user's login name, User
391Identification (UID),
392shell, initial group, home directory, etc.</para>
393<indexterm zone="ch-system-shadow usermod"><primary sortas="b-usermod">usermod</primary></indexterm>
394</listitem>
395</varlistentry>
396
397<varlistentry id="vigr">
398<term><command>vigr</command></term>
399<listitem>
400<para>Edits the <filename>/etc/group</filename> or
401<filename>/etc/gshadow</filename> files</para>
402<indexterm zone="ch-system-shadow vigr"><primary sortas="b-vigr">vigr</primary></indexterm>
403</listitem>
404</varlistentry>
405
406<varlistentry id="vipw">
407<term><command>vipw</command></term>
408<listitem>
409<para>Edits the <filename>/etc/passwd</filename> or
410<filename>/etc/shadow</filename> files</para>
411<indexterm zone="ch-system-shadow vipw"><primary sortas="b-vipw">vipw</primary></indexterm>
412</listitem>
413</varlistentry>
414
415<varlistentry id="libshadow">
416<term><filename class="libraryfile">libshadow</filename></term>
417<listitem>
418<para>Contains functions used by most programs in this package</para>
419<indexterm zone="ch-system-shadow libshadow"><primary sortas="c-libshadow">libshadow</primary></indexterm>
420</listitem>
421</varlistentry>
422</variablelist>
423
424</sect2>
425
426</sect1>
427
Note: See TracBrowser for help on using the repository browser.