source: postlfs/security/sudo.xml@ aca44793

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since aca44793 was aca44793, checked in by Bruce Dubbs <bdubbs@…>, 10 years ago

Update to sudo-1.8.10p3

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@13044 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 9.8 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 sudo-download-http "http://www.sudo.ws/sudo/dist/sudo-&sudo-version;.tar.gz">
8 <!ENTITY sudo-download-ftp "ftp://ftp.sudo.ws/pub/sudo/sudo-&sudo-version;.tar.gz">
9 <!ENTITY sudo-md5sum "fcd8d0d9f9f0397d076ee901e242ed39">
10 <!ENTITY sudo-size "2.2 MB">
11 <!ENTITY sudo-buildsize "32 MB (additional 1 MB for tests)">
12 <!ENTITY sudo-time "0.6 SBU">
13]>
14
15<sect1 id="sudo" xreflabel="Sudo-&sudo-version;">
16 <?dbhtml filename="sudo.html"?>
17
18 <sect1info>
19 <othername>$LastChangedBy$</othername>
20 <date>$Date$</date>
21 </sect1info>
22
23 <title>Sudo-&sudo-version;</title>
24
25 <indexterm zone="sudo">
26 <primary sortas="a-Sudo">Sudo</primary>
27 </indexterm>
28
29 <sect2 role="package">
30 <title>Introduction to Sudo</title>
31
32 <para>
33 The <application>Sudo</application> package allows a system administrator
34 to give certain users (or groups of users) the ability to run
35 some (or all) commands as
36 <systemitem class="username">root</systemitem> or another user while
37 logging the commands and arguments.
38 </para>
39
40 &lfs75_checked;
41
42 <bridgehead renderas="sect3">Package Information</bridgehead>
43 <itemizedlist spacing="compact">
44 <listitem>
45 <para>
46 Download (HTTP): <ulink url="&sudo-download-http;"/>
47 </para>
48 </listitem>
49 <listitem>
50 <para>
51 Download (FTP): <ulink url="&sudo-download-ftp;"/>
52 </para>
53 </listitem>
54 <listitem>
55 <para>
56 Download MD5 sum: &sudo-md5sum;
57 </para>
58 </listitem>
59 <listitem>
60 <para>
61 Download size: &sudo-size;
62 </para>
63 </listitem>
64 <listitem>
65 <para>
66 Estimated disk space required: &sudo-buildsize;
67 </para>
68 </listitem>
69 <listitem>
70 <para>
71 Estimated build time: &sudo-time;
72 </para>
73 </listitem>
74 </itemizedlist>
75
76 <bridgehead renderas="sect3">Sudo Dependencies</bridgehead>
77
78 <bridgehead renderas="sect4">Optional</bridgehead>
79 <para role="optional">
80 <ulink url="http://www.openafs.org/">AFS</ulink>,
81 <ulink url="http://www.fwtk.org/">FWTK</ulink>,
82 <xref linkend="linux-pam"/>,
83 <xref linkend="mitkrb"/>,
84 an <xref linkend="server-mail"/> (that provides a
85 <command>sendmail</command> command),
86 <xref linkend="openldap"/>,
87 <ulink url="http://sourceforge.net/projects/opie/files/">Opie</ulink> and
88 <ulink url="http://www.rsa.com/node.aspx?id=1156">SecurID</ulink>
89 </para>
90
91 <para condition="html" role="usernotes">User Notes:
92 <ulink url="&blfs-wiki;/sudo"/>
93 </para>
94 </sect2>
95
96 <sect2 role="installation">
97 <title>Installation of Sudo</title>
98
99 <para>
100 Install <application>Sudo</application> by running the following commands:
101 </para>
102
103<!-- Developer: apparently it is disabled by default, although in configure it
104is written otherwise -disable-static \-->
105<screen><userinput>./configure --prefix=/usr \
106 --libexecdir=/usr/lib \
107 --with-all-insults \
108 --with-env-editor \
109 --docdir=/usr/share/doc/sudo-&sudo-version; \
110 --with-passprompt="[sudo] password for %p" &amp;&amp;
111make</userinput></screen>
112
113 <para>
114 To test the results, issue: <command>env LC_ALL=C make check</command>.
115 </para>
116
117 <para>
118 Now, as the <systemitem class="username">root</systemitem> user:
119 </para>
120
121<screen role="root"><userinput>make install</userinput></screen>
122
123 </sect2>
124
125 <sect2 role="commands">
126 <title>Command Explanations</title>
127
128 <para>
129 <parameter>--libexecdir=/usr/lib</parameter>: This switch controls where
130 private programs are installed. Everything in that directory is a library, so
131 they belong under <filename class="directory">/usr/lib</filename> instead of
132 <filename class="directory">/usr/libexec</filename>.
133 </para>
134
135 <para>
136 <parameter>--with-all-insults</parameter>: This switch includes all the
137 <application>sudo</application> insult sets.
138 </para>
139
140 <para>
141 <parameter>--with-env-editor</parameter>: This switch enables use of the
142 environment variable EDITOR for <command>visudo</command>.
143 </para>
144
145 <para>
146 <parameter>--with-passprompt</parameter>: This switch sets the prompt.
147 </para>
148
149 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
150 href="../../xincludes/static-libraries.xml"/>
151
152 <note>
153 <para>
154 There are many options to <application>sudo</application>'s
155 <command>configure</command> command. Check the
156 <command>configure --help</command> output for a complete list.
157 </para>
158 </note>
159
160 </sect2>
161
162 <sect2 role="configuration">
163 <title>Configuring Sudo</title>
164
165 <sect3 id="sudo-config">
166 <title>Config File</title>
167
168 <para>
169 <filename>/etc/sudoers</filename>
170 </para>
171
172 <indexterm zone="sudo sudo-config">
173 <primary sortas="e-etc-sudoers">/etc/sudoers</primary>
174 </indexterm>
175
176 </sect3>
177
178 <sect3>
179 <title>Configuration Information</title>
180
181 <para>
182 The <filename>sudoers</filename> file can be quite complicated. It
183 is composed of two types of entries: aliases (basically variables) and
184 user specifications (which specify who may run what). The installation
185 installs a default configuration that has no privileges installed for any
186 user.
187 </para>
188
189 <para>
190 One example usage is to allow the system administrator to execute
191 any program without typing a password each time root privileges are
192 needed. This can be configured as:
193 </para>
194
195<screen># User alias specification
196User_Alias ADMIN = YourLoginId
197
198# Allow people in group ADMIN to run all commands without a password
199ADMIN ALL = NOPASSWD: ALL</screen>
200
201 <para>
202 For details, see <command>man sudoers</command>.
203 </para>
204
205 <note>
206 <para>
207 The <application>Sudo</application> developers highly recommend
208 using the <command>visudo</command> program to edit the
209 <filename>sudoers</filename> file. This will provide basic sanity
210 checking like syntax parsing and file permission to avoid some possible
211 mistakes that could lead to a vulnerable configuration.
212 </para>
213 </note>
214
215 <para>
216 If you've built <application>Sudo</application> with
217 <application>PAM</application> support, issue the following
218 command as the <systemitem class="username">root</systemitem> user
219 to create the <application>PAM</application> configuration file:
220 </para>
221
222<screen role="root"><userinput>cat &gt; /etc/pam.d/sudo &lt;&lt; "EOF"
223<literal># Begin /etc/pam.d/sudo
224
225# include the default auth settings
226auth include system-auth
227
228# include the default account settings
229account include system-account
230
231# Set default environment variables for the service user
232session required pam_env.so
233
234# include system session defaults
235session include system-session
236
237# End /etc/pam.d/sudo</literal>
238EOF
239chmod 644 /etc/pam.d/sudo</userinput></screen>
240
241 </sect3>
242
243 </sect2>
244
245 <sect2 role="content">
246 <title>Contents</title>
247
248 <segmentedlist>
249 <segtitle>Installed Programs</segtitle>
250 <segtitle>Installed Libraries</segtitle>
251 <segtitle>Installed Directories</segtitle>
252
253 <seglistitem>
254 <seg>
255 sudo, sudoedit (symlink), sudoreplay, and visudo
256 </seg>
257 <seg>
258 group_file.so, sudoers.so, sudo_noexec.so, and system_group.so
259 </seg>
260 <seg>
261 /etc/sudoers.d,
262 /usr/lib/sudo,
263 /usr/share/doc/sudo-&sudo-version;, and
264 /var/{db,run}/sudo
265 </seg>
266 </seglistitem>
267 </segmentedlist>
268
269 <variablelist>
270 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
271 <?dbfo list-presentation="list"?>
272 <?dbhtml list-presentation="table"?>
273
274 <varlistentry id="sudo_prog">
275 <term><command>sudo</command></term>
276 <listitem>
277 <para>
278 executes a command as another user as permitted by
279 the <filename>/etc/sudoers</filename> configuration file.
280 </para>
281 <indexterm zone="sudo sudo">
282 <primary sortas="b-sudo">sudo</primary>
283 </indexterm>
284 </listitem>
285 </varlistentry>
286
287 <varlistentry id="sudoedit">
288 <term><command>sudoedit</command></term>
289 <listitem>
290 <para>
291 is a symlink to <command>sudo</command> that implies the
292 <option>-e</option> option to invoke an editor as another user.
293 </para>
294 <indexterm zone="sudo sudoedit">
295 <primary sortas="b-sudoedit">sudoedit</primary>
296 </indexterm>
297 </listitem>
298 </varlistentry>
299
300 <varlistentry id="visudo">
301 <term><command>visudo</command></term>
302 <listitem>
303 <para>
304 allows for safer editing of the <filename>sudoers</filename>
305 file.
306 </para>
307 <indexterm zone="sudo visudo">
308 <primary sortas="b-visudo">visudo</primary>
309 </indexterm>
310 </listitem>
311 </varlistentry>
312
313 <varlistentry id="sudoreplay">
314 <term><command>sudoreplay</command></term>
315 <listitem>
316 <para>
317 is used to play back or list the output
318 logs created by <command>sudo</command>.
319 </para>
320 <indexterm zone="sudo sudoreplay">
321 <primary sortas="b-sudoreplay">sudoreplay</primary>
322 </indexterm>
323 </listitem>
324 </varlistentry>
325
326 </variablelist>
327
328 </sect2>
329
330</sect1>
Note: See TracBrowser for help on using the repository browser.