source: chapter06/shadow.xml@ bdee2f5

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.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 bdee2f5 was 04dd973, checked in by Matthew Burgess <matthew@…>, 19 years ago

Remove groups from the list of programs installed by shadow

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

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