source: archive/util-linux.xml@ 7107b6ef

11.1 11.2 11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 7107b6ef was 7107b6ef, checked in by Bruce Dubbs <bdubbs@…>, 2 years ago

Package updates.
Update to nano-6.2.
Update to vim-8.2.4383. Sync with LFS.

  • Property mode set to 100644
File size: 10.1 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 <!ENTITY util-linux-download-http "https://www.kernel.org/pub/linux/utils/util-linux/v&util-linux-minor;/util-linux-&util-linux-version;.tar.xz">
8 <!ENTITY util-linux-download-ftp " ">
9 <!ENTITY util-linux-md5sum "d659bf7cd417d93dc609872f6334b019">
10 <!ENTITY util-linux-size "5.4 MB">
11 <!ENTITY util-linux-buildsize "60 MB">
12 <!ENTITY util-linux-time "less than 0.1 SBU">
13]>
14
15<sect1 id="util-linux" xreflabel="Util-linux-&util-linux-version;">
16 <?dbhtml filename="util-linux.html"?>
17
18 <sect1info>
19 <date>$Date$</date>
20 </sect1info>
21
22 <title>Util-linux-&util-linux-version;</title>
23
24 <indexterm zone="util-linux">
25 <primary sortas="a-Util-linux">Util-linux</primary>
26 </indexterm>
27
28 <sect2 role="package">
29 <title>Introduction to Util-linux</title>
30
31 <para>
32 <application>Util-linux</application> was indeed installed in LFS and
33 there is no reason to reinstall it unless you installed
34 <application>Linux-PAM</application> after your LFS system was completed.
35 If you have installed <application>Linux-PAM</application>,
36 it's possible to build <command>su</command> and
37 <command>runuser</command> from <application>Util-linux</application>.
38 The <application>Shadow</application> maintainers recommend using
39 <command>su</command> from <application>Util-linux</application>
40 instead of the version from <application>Shadow</application>.
41 </para>
42
43 &lfs110a_checked;
44
45 <bridgehead renderas="sect3">Package Information</bridgehead>
46 <itemizedlist spacing="compact">
47 <listitem>
48 <para>
49 Download (HTTP): <ulink url="&util-linux-download-http;"/>
50 </para>
51 </listitem>
52 <listitem>
53 <para>
54 Download (FTP): <ulink url="&util-linux-download-ftp;"/>
55 </para>
56 </listitem>
57 <listitem>
58 <para>
59 Download MD5 sum: &util-linux-md5sum;
60 </para>
61 </listitem>
62 <listitem>
63 <para>
64 Download size: &util-linux-size;
65 </para>
66 </listitem>
67 <listitem>
68 <para>
69 Estimated disk space required: &util-linux-buildsize;
70 </para>
71 </listitem>
72 <listitem>
73 <para>
74 Estimated build time: &util-linux-time;
75 </para>
76 </listitem>
77 </itemizedlist>
78
79 <bridgehead renderas="sect3">Util-linux Dependencies</bridgehead>
80
81 <bridgehead renderas="sect4">Required</bridgehead>
82 <para role="required">
83 <xref linkend="linux-pam"/>
84 </para>
85
86 <para condition="html" role="usernotes">
87 User Notes: <ulink url="&blfs-wiki;/shadow"/>
88 </para>
89 </sect2>
90
91 <sect2 role="installation">
92 <title>Installation of Util-linux</title>
93
94 <important>
95 <para>
96 The installation commands shown below are for installations where
97 <application>Linux-PAM</application> has been installed and
98 <application>Util-linux</application> is being rebuilt to
99 support the <application>Linux-PAM</application> installation.
100 </para>
101
102 <para>
103 If you are upgrading <application>Util-linux</application>, follow
104 the instruction for <application>Util-linux</application> in
105 <ulink url='&lfs-dev;/chapter08/util-linux.html'>LFS</ulink>. If
106 <application>Linux-PAM</application> has been installed,
107 <command>su</command> and <command>runuser</command> will
108 automatically be built too. You should follow
109 <xref linkend='pam-util-linux'/> to set up the PAM
110 configuration in this case.
111 </para>
112 </important>
113
114 <para>
115 Build <command>su</command> and <command>runuser</command> from
116 <application>Util-linux</application>:
117 </para>
118
119<screen><userinput>./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \
120 --libdir=/usr/lib \
121 --docdir=/usr/share/doc/util-linux-&util-linux-version; \
122 --disable-chfn-chsh \
123 --disable-login \
124 --disable-nologin \
125 --disable-setpriv \
126 --disable-pylibmount \
127 --disable-static \
128 --without-python \
129 runstatedir=/run &amp;&amp;
130make su runuser</userinput></screen>
131
132 <para>
133 This package does not come with a test suite.
134 </para>
135
136 <para>
137 Now, as the <systemitem class="username">root</systemitem> user:
138 </para>
139
140<screen role="root"><userinput>install -vm4755 su /usr/bin/su
141install -vm0755 runuser /usr/sbin/runuser
142find /usr/share/man -name su.1 -delete
143install -vm0644 login-utils/{su,runuser}.1 /usr/share/man/man1</userinput></screen>
144
145 </sect2>
146
147 <sect2 role="commands">
148 <title>Command Explanations</title>
149
150 <para>
151 <command>find /usr/share/man -name su.1 -delete</command>: This
152 is used to remove the man pages for <command>su</command> installed
153 from <application>Shadow</application>.
154 <application>Shadow</application> installs man pages with multiple
155 languages. They need to be removed to prevent
156 <command>man su</command> from picking up a translated man page
157 instead of <filename>/usr/share/man/man1/su.1</filename>.
158 </para>
159 </sect2>
160
161 <sect2 role="configuration">
162 <title>Configuring Linux-PAM to Work with Util-linux</title>
163
164 <sect3>
165 <title>Config Files</title>
166
167 <para>
168 <filename>/etc/pam.d/su</filename>,
169 <filename>/etc/pam.d/su-l</filename>, and
170 <filename>/etc/pam.d/runuser</filename>
171 </para>
172
173 <indexterm zone="util-linux pam.d">
174 <primary sortas="e-etc-pam.d-su">/etc/pam.d/su</primary>
175 </indexterm>
176
177 <indexterm zone="util-linux pam.d">
178 <primary sortas="e-etc-pam.d-su">/etc/pam.d/su-l</primary>
179 </indexterm>
180
181 <indexterm zone="util-linux pam.d">
182 <primary sortas="e-etc-pam.d-su">/etc/pam.d/runuser</primary>
183 </indexterm>
184 </sect3>
185
186 <sect3 id='pam-util-linux'>
187 <title>Configuring the /etc/pam.d/ Files</title>
188
189 <para>
190 As the <systemitem class="username">root</systemitem> user, create
191 the following <application>Linux-PAM</application> configuration files
192 in the <filename class="directory">/etc/pam.d/</filename> directory
193 (or add the contents to the <filename>/etc/pam.conf</filename> file)
194 using the following commands:
195 </para>
196
197 <sect4>
198 <title>'su' and 'su-l'</title>
199
200<screen role="root"><userinput>cat &gt; /etc/pam.d/su &lt;&lt; "EOF"
201<literal># Begin /etc/pam.d/su
202
203# always allow root
204auth sufficient pam_rootok.so
205
206# Allow users in the wheel group to execute su without a password
207# disabled by default
208#auth sufficient pam_wheel.so trust use_uid
209
210# include system auth settings
211auth include system-auth
212
213# limit su to users in the wheel group
214auth required pam_wheel.so use_uid
215
216# include system account settings
217account include system-account
218
219# Set default environment variables for the service user
220session required pam_env.so
221
222# include system session settings
223session include system-session
224
225# End /etc/pam.d/su</literal>
226EOF
227ln -sv su /etc/pam.d/su-l</userinput></screen>
228
229 </sect4>
230
231 <sect4>
232 <title>'runuser'</title>
233
234<screen role="root"><userinput>cat &gt; /etc/pam.d/runuser &lt;&lt; "EOF"
235<literal># Begin /etc/pam.d/runuser
236
237auth sufficient pam_rootok.so
238session include system-session
239
240# End /etc/pam.d/runuser</literal>
241EOF</userinput></screen>
242
243 <warning>
244 <para>
245 At this point, you should do a simple test to see if
246 <command>su</command> is working as expected. Open
247 another terminal and log in as a user, then
248 <command>su</command> to
249 <systemitem class="username">root</systemitem>.
250 If you do not see any errors, then all is well.
251 If you did receive errors, stop now and double check the
252 above configuration files manually. One obvious reason
253 for an error is if the user is not in group <systemitem
254 class="groupname">wheel</systemitem>. You may want to run
255 (as <systemitem class="username">root</systemitem>):
256 <command>usermod -a -G wheel
257 <replaceable>&lt;user&gt;</replaceable></command>.
258 Any other error is the sign of an error in the above
259 procedure. You can also run the test suite from the
260 <application>Linux-PAM</application> package to assist you
261 in determining the cause of the problem.
262 </para>
263 </warning>
264 </sect4>
265 </sect3>
266 </sect2>
267
268 <sect2 role="content">
269 <title>Contents</title>
270
271 <para>
272 Listed below are the newly installed programs along with short
273 descriptions.
274 </para>
275
276 <segmentedlist>
277 <segtitle>Installed Programs</segtitle>
278
279 <seglistitem>
280 <seg>
281 su and runuser
282 </seg>
283 </seglistitem>
284 </segmentedlist>
285
286 <variablelist>
287 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
288 <?dbfo list-presentation="list"?>
289 <?dbhtml list-presentation="table"?>
290
291 <varlistentry id="su">
292 <term><command>su</command></term>
293 <listitem>
294 <para>
295 runs a command with substitute user and group ID
296 </para>
297 <indexterm zone="util-linux su">
298 <primary sortas="b-su">su</primary>
299 </indexterm>
300 </listitem>
301 </varlistentry>
302
303 <varlistentry id="runuser">
304 <term><command>runuser</command></term>
305 <listitem>
306 <para>
307 runs a command with substitute user and group ID; it's like
308 <command>su</command> but can only be used as
309 the <systemitem class='username'>root</systemitem> user.
310 </para>
311 <indexterm zone="util-linux runuser">
312 <primary sortas="b-util-linux-runuser">runuser</primary>
313 </indexterm>
314 </listitem>
315 </varlistentry>
316
317 </variablelist>
318
319 </sect2>
320
321</sect1>
Note: See TracBrowser for help on using the repository browser.