source: postlfs/security/sudo.xml@ 6c3a7cc

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

Reordered xfce core packages.
Added dbus instructions to xfce4-session.

Added a pulse user to pulseaudio instructions
for dbus communications.

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

  • Property mode set to 100644
File size: 9.7 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 "b9be6df7ecefedff2263052ed9fc5e93">
10 <!ENTITY sudo-size "1.5 MB">
11 <!ENTITY sudo-buildsize "16 MB">
12 <!ENTITY sudo-time "0.3 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 &lfs71_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"><ulink url="http://www.openafs.org/">AFS</ulink>,
66 <xref linkend="linux-pam"/>,
67 <ulink url="http://www.fwtk.org/">FWTK</ulink>,
68 <xref linkend="mitkrb"/>,
69 an <xref linkend="server-mail"/> (that provides a
70 <command>sendmail</command> command),
71 <xref linkend="openldap"/>,
72 <ulink url="ftp://ftp.nrl.navy.mil/pub/security/opie">Opie</ulink> and
73 <ulink url="http://www.rsa.com/node.aspx?id=1156">SecurID</ulink></para>
74
75 <para condition="html" role="usernotes">User Notes:
76 <ulink url="&blfs-wiki;/sudo"/></para>
77
78 </sect2>
79
80 <sect2 role="installation">
81 <title>Installation of Sudo</title>
82
83 <para>Install <application>sudo</application> by running
84 the following commands:</para>
85
86<screen><userinput>./configure --prefix=/usr \
87 --libexecdir=/usr/lib/sudo \
88 --docdir=/usr/share/doc/sudo-&sudo-version; \
89 --with-all-insults \
90 --with-env-editor \
91 --without-pam \
92 --without-sendmail &amp;&amp;
93make</userinput></screen>
94
95 <para>This package does not come with a test suite.</para>
96
97 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
98
99<screen role="root"><userinput>make install</userinput></screen>
100
101 </sect2>
102
103 <sect2 role="commands">
104 <title>Command Explanations</title>
105
106 <para><option>--with-all-insults</option>: This switch includes all the
107 <application>sudo</application> insult sets.</para>
108
109 <para><option>--with-env-editor</option>: This switch enables use of the
110 environment variable EDITOR for <command>visudo</command>.</para>
111
112 <para><option>--without-pam</option>: This switch disables the use of
113 <application>PAM</application> authentication. Omit if you have
114 <application>Linux PAM</application> installed.</para>
115
116 <para><option>--without-sendmail</option>: This switch disables the use of
117 sendmail. Remove if you have a sendmail compatible MTA.</para>
118
119 <note>
120 <para>There are many options to <application>sudo</application>'s
121 <command>configure</command> command. Check the
122 <command>configure --help</command> output for a complete list.</para>
123 </note>
124
125 </sect2>
126
127 <sect2 role="configuration">
128 <title>Configuring Sudo</title>
129
130 <sect3 id="sudo-config">
131 <title>Config File</title>
132
133 <para><filename>/etc/sudoers</filename></para>
134
135 <indexterm zone="sudo sudo-config">
136 <primary sortas="e-etc-sudoers">/etc/sudoers</primary>
137 </indexterm>
138
139 </sect3>
140
141 <sect3>
142 <title>Configuration Information</title>
143
144 <para>The <filename>sudoers</filename> file can be quite complicated. It
145 is composed of two types of entries: aliases (basically variables) and
146 user specifications (which specify who may run what). The installation
147 installs a default configuration that has no privileges installed for any
148 user.</para>
149
150 <para>One example usage is to allow the system administrator to execute
151 any program without typing a password each time root privileges are
152 needed. This can be configured as:</para>
153
154<screen># User alias specification
155User_Alias ADMIN = YourLoginId
156
157# Allow people in group ADMIN to run all commands without a password
158ADMIN ALL = NOPASSWD: ALL</screen>
159
160 <para>For details, see <command>man sudoers</command>.</para>
161
162 <note>
163 <para>The <application>Sudo</application> developers highly recommend
164 using the <command>visudo</command> program to edit the
165 <filename>sudoers</filename> file. This will provide basic sanity
166 checking like syntax parsing and file permission to avoid some possible
167 mistakes that could lead to a vulnerable configuration.</para>
168 </note>
169
170 <para>If you've built <application>Sudo</application> with
171 <application>PAM</application> support, issue the following
172 command as the <systemitem class="username">root</systemitem> user
173 to create the <application>PAM</application> configuration file:</para>
174
175<screen role="root"><userinput>cat &gt; /etc/pam.d/sudo &lt;&lt; "EOF" &amp;&amp;
176# Begin /etc/pam.d/sudo
177
178# include the default auth settings
179auth include system-auth
180
181# include the default account settings
182account include system-account
183
184# Set default environment variables for the service user
185session required pam_env.so
186
187# include system session defaults
188session include system-session
189
190# End /etc/pam.d/sudo
191EOF
192chmod 644 /etc/pam.d/sudo</userinput></screen>
193
194 </sect3>
195
196 </sect2>
197
198 <sect2 role="content">
199 <title>Contents</title>
200
201 <segmentedlist>
202 <segtitle>Installed Programs</segtitle>
203 <segtitle>Installed Library</segtitle>
204 <segtitle>Installed Directories</segtitle>
205
206 <seglistitem>
207 <seg>sudo, sudoedit, sudoreplay and visudo</seg>
208 <seg>sudoers.so and sudo_noexec.so</seg>
209 <seg>None</seg>
210 </seglistitem>
211 </segmentedlist>
212
213 <variablelist>
214 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
215 <?dbfo list-presentation="list"?>
216 <?dbhtml list-presentation="table"?>
217
218 <varlistentry id="sudo_prog">
219 <term><command>sudo</command></term>
220 <listitem>
221 <para>executes a command as another user as permitted by
222 the <filename>/etc/sudoers</filename> configuration file.
223 </para>
224 <indexterm zone="sudo sudo">
225 <primary sortas="b-sudo">sudo</primary>
226 </indexterm>
227 </listitem>
228 </varlistentry>
229
230 <varlistentry id="sudoedit">
231 <term><command>sudoedit</command></term>
232 <listitem>
233 <para>is a hard link to <command>sudo</command> that implies
234 the <option>-e</option> option to invoke an editor as another
235 user.</para>
236 <indexterm zone="sudo sudoedit">
237 <primary sortas="b-sudoedit">sudoedit</primary>
238 </indexterm>
239 </listitem>
240 </varlistentry>
241
242 <varlistentry id="visudo">
243 <term><command>visudo</command></term>
244 <listitem>
245 <para>allows for safer editing of the <filename>sudoers</filename>
246 file.</para>
247 <indexterm zone="sudo visudo">
248 <primary sortas="b-visudo">visudo</primary>
249 </indexterm>
250 </listitem>
251 </varlistentry>
252
253 <varlistentry id="sudoreplay">
254 <term><command>sudoreplay</command></term>
255 <listitem>
256 <para>is used to play back or list the output
257 logs created by <command>sudo</command>.</para>
258 <indexterm zone="sudo sudoreplay">
259 <primary sortas="b-sudoreplay">sudoreplay</primary>
260 </indexterm>
261 </listitem>
262 </varlistentry>
263
264 <varlistentry id="sudoers">
265 <term><filename class='libraryfile'>sudoers.so</filename></term>
266 <listitem>
267 <para>is default sudo security policy module.</para>
268 <indexterm zone="sudo sudoers">
269 <primary sortas="c-sudoers">sudoers.so</primary>
270 </indexterm>
271 </listitem>
272 </varlistentry>
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.