source: postlfs/security/sudo.xml@ b3a4f60

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.4 7.5 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 b3a4f60 was b3a4f60, checked in by DJ Lucas <dj@…>, 14 years ago

Updated to sudo-1.7.4p4.

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

  • Property mode set to 100644
File size: 10.0 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.twaren.net/Unix/Security/Sudo/sudo-&sudo-version;.tar.gz">
9 <!ENTITY sudo-md5sum "b4bb9a0ae896958b71e48ef91967cdcb">
10 <!ENTITY sudo-size "772 KB">
11 <!ENTITY sudo-buildsize "5 MB">
12 <!ENTITY sudo-time "0.1 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>The <application>sudo</application> package allows a system
33 administrator to give certain users (or groups of users) the ability to run
34 some (or all) commands as
35 <systemitem class="username">root</systemitem> or another user while
36 logging the commands and arguments.</para>
37
38 <bridgehead renderas="sect3">Package Information</bridgehead>
39 <itemizedlist spacing="compact">
40 <listitem>
41 <para>Download (HTTP): <ulink url="&sudo-download-http;"/></para>
42 </listitem>
43 <listitem>
44 <para>Download (FTP): <ulink url="&sudo-download-ftp;"/></para>
45 </listitem>
46 <listitem>
47 <para>Download MD5 sum: &sudo-md5sum;</para>
48 </listitem>
49 <listitem>
50 <para>Download size: &sudo-size;</para>
51 </listitem>
52 <listitem>
53 <para>Estimated disk space required: &sudo-buildsize;</para>
54 </listitem>
55 <listitem>
56 <para>Estimated build time: &sudo-time;</para>
57 </listitem>
58 </itemizedlist>
59
60<!-- <bridgehead renderas="sect3">Additional Downloads</bridgehead>
61 <itemizedlist spacing='compact'>
62 <listitem>
63 <para>Required patch: <ulink
64 url="&patch-root;/sudo-&sudo-version;-envvar_fix-1.patch"/></para>
65 </listitem>
66 </itemizedlist> -->
67
68
69 <bridgehead renderas="sect3">Sudo Dependencies</bridgehead>
70
71 <bridgehead renderas="sect4">Optional</bridgehead>
72 <para role="optional"><xref linkend="linux-pam"/>,
73 <ulink url="ftp://ftp.nrl.navy.mil/pub/security/opie">Opie</ulink>,
74 <ulink url="http://www.rsa.com/node.aspx?id=1156">SecurID</ulink>,
75 <ulink url="http://www.fwtk.org/">FWTK</ulink>,
76 an <xref linkend="server-mail"/> (that provides a
77 <command>sendmail</command> command),
78 <ulink url="http://www.pdc.kth.se/kth-krb/">krb4</ulink>,
79 <xref linkend="heimdal"/> or <xref linkend="mitkrb"/>,
80 <xref linkend="openldap"/>, and
81 <ulink url="http://www.openafs.org/">AFS</ulink></para>
82
83 <para condition="html" role="usernotes">User Notes:
84 <ulink url="&blfs-wiki;/sudo"/></para>
85
86 </sect2>
87
88 <sect2 role="installation">
89 <title>Installation of Sudo</title>
90
91 <para>Install <application>sudo</application> by running
92 the following commands:</para>
93
94<!-- <screen><userinput>patch -Np1 -i ../sudo-&sudo-version;-envvar_fix-1.patch &amp;&amp;
95-->
96<screen><userinput>./configure --prefix=/usr \
97 --libexecdir=/usr/lib \
98 --with-ignore-dot \
99 --with-all-insults \
100 --enable-shell-sets-home \
101 --disable-root-sudo \
102 --with-logfac=auth \
103 --without-pam \
104 --without-sendmail &amp;&amp;
105make</userinput></screen>
106
107 <para>This package does not come with a test suite.</para>
108
109 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
110
111<screen role="root"><userinput>make install</userinput></screen>
112
113 </sect2>
114
115 <sect2 role="commands">
116 <title>Command Explanations</title>
117
118 <para><option>--with-ignore-dot</option>: This switch causes
119 <application>sudo</application> to ignore '.' in the PATH.</para>
120
121 <para><option>--with-all-insults</option>: This switch includes all the
122 <application>sudo</application> insult sets.</para>
123
124 <para><option>--enable-shell-sets-home</option>: This switch sets HOME to
125 the target user in shell mode.</para>
126
127 <para><option>--disable-root-sudo</option>: This switch keeps the
128 <systemitem class="username">root</systemitem> user from running sudo,
129 preventing users from chaining commands to get a root shell.</para>
130
131 <para><option>--with-logfac=auth</option>: This switch forces use of the
132 auth facility for logging.</para>
133
134 <para><option>--without-pam</option>: This switch disables the use of
135 <application>PAM</application> authentication. Omit if you have
136 <application>PAM</application> installed.</para>
137
138 <para><option>--without-sendmail</option>: This switch disables the use of
139 sendmail. Remove if you have a sendmail compatible MTA.</para>
140
141 <para><option>--enable-noargs-shell</option>: This switch allows
142 <application>sudo</application> to run a shell if invoked with no
143 arguments.</para>
144
145 <note>
146 <para>There are many options to <application>sudo</application>'s
147 <command>configure</command> command. Check the
148 <command>configure --help</command> output for a complete list.</para>
149 </note>
150
151 </sect2>
152
153 <sect2 role="configuration">
154 <title>Configuring Sudo</title>
155
156 <sect3 id="sudo-config">
157 <title>Config File</title>
158
159 <para><filename>/etc/sudoers</filename></para>
160
161 <indexterm zone="sudo sudo-config">
162 <primary sortas="e-etc-sudoers">/etc/sudoers</primary>
163 </indexterm>
164
165 </sect3>
166
167 <sect3>
168 <title>Configuration Information</title>
169
170 <para>The <filename>sudoers</filename> file can be quite complicated. It
171 is composed of two types of entries: aliases (basically variables) and
172 user specifications (which specify who may run what). The installation
173 installs a default configuration that has no privileges installed for any
174 user.</para>
175
176 <para>One example usage is to allow the system administrator to execute
177 any program without typing a password each time root privileges are
178 needed. This can be configured as:</para>
179
180<screen># User alias specification
181User_Alias ADMIN = YourLoginId
182
183# Allow people in group ADMIN to run all commands without a password
184ADMIN ALL = NOPASSWD: ALL</screen>
185
186 <para>For details, see <command>man sudoers</command>.</para>
187
188 <note>
189 <para>The <application>Sudo</application> developers highly recommend
190 using the <command>visudo</command> program to edit the
191 <filename>sudoers</filename> file. This will provide basic sanity
192 checking like syntax parsing and file permission to avoid some possible
193 mistakes that could lead to a vulnerable configuration.</para>
194 </note>
195
196 <para>If you've built <application>Sudo</application> with
197 <application>PAM</application> support, issue the following
198 command as the <systemitem class="username">root</systemitem> user
199 to create the <application>PAM</application> configuration file:</para>
200
201<screen role="root"><userinput>cat &gt; /etc/pam.d/sudo &lt;&lt; "EOF" &amp;&amp;
202# Begin /etc/pam.d/sudo
203
204# include the default auth settings
205auth include system-auth
206
207# include the default account settings
208account include system-account
209
210# Use xauth keys (if available)
211session optional pam_xauth.so
212
213# Set default environment variables for the service user
214session required pam_env.so
215
216# include system session defaults
217session include system-session
218
219# End /etc/pam.d/sudo
220EOF
221chmod 644 /etc/pam.d/sudo</userinput></screen>
222
223 </sect3>
224
225 </sect2>
226
227 <sect2 role="content">
228 <title>Contents</title>
229
230 <segmentedlist>
231 <segtitle>Installed Programs</segtitle>
232 <segtitle>Installed Library</segtitle>
233 <segtitle>Installed Directories</segtitle>
234
235 <seglistitem>
236 <seg>sudo, sudoedit, and visudo</seg>
237 <seg>sudo_noexec.so</seg>
238 <seg>None</seg>
239 </seglistitem>
240 </segmentedlist>
241
242 <variablelist>
243 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
244 <?dbfo list-presentation="list"?>
245 <?dbhtml list-presentation="table"?>
246
247 <varlistentry id="sudo_prog">
248 <term><command>sudo</command></term>
249 <listitem>
250 <para>executes a command as another user as permitted by
251 the <filename>/etc/sudoers</filename> configuration file.
252 </para>
253 <indexterm zone="sudo sudo">
254 <primary sortas="b-sudo">sudo</primary>
255 </indexterm>
256 </listitem>
257 </varlistentry>
258
259 <varlistentry id="sudoedit">
260 <term><command>sudoedit</command></term>
261 <listitem>
262 <para>is a hard link to <command>sudo</command> that implies
263 the <option>-e</option> option to invoke an editor as another
264 user.</para>
265 <indexterm zone="sudo sudoedit">
266 <primary sortas="b-sudoedit">sudoedit</primary>
267 </indexterm>
268 </listitem>
269 </varlistentry>
270
271 <varlistentry id="visudo">
272 <term><command>visudo</command></term>
273 <listitem>
274 <para>allows for safer editing of the <filename>sudoers</filename>
275 file.</para>
276 <indexterm zone="sudo visudo">
277 <primary sortas="b-visudo">visudo</primary>
278 </indexterm>
279 </listitem>
280 </varlistentry>
281
282
283 <varlistentry id="sudo_noexec">
284 <term><filename class='libraryfile'>sudo_noexec.so</filename></term>
285 <listitem>
286 <para>enables support for the "noexec" functionality which prevents
287 a dynamically-linked program being run by sudo from executing
288 another program (think shell escapes).</para>
289 <indexterm zone="sudo sudo_noexec">
290 <primary sortas="c-sudo_noexec">sudo_noexec.so</primary>
291 </indexterm>
292 </listitem>
293 </varlistentry>
294
295 </variablelist>
296
297 </sect2>
298
299</sect1>
Note: See TracBrowser for help on using the repository browser.