source: postlfs/security/sudo.xml@ 1ed7820

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 1ed7820 was 1ed7820, checked in by Bruce Dubbs <bdubbs@…>, 12 years ago

Update build validations

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

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