source: postlfs/security/sudo.xml@ bb11ee6

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 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 bb11ee6 was bb11ee6, checked in by Fernando de Oliveira <fernando@…>, 10 years ago

Reintroduce some modifications I did before and after, removed, by mistake. Change to upper case an OJDK switch vakue.

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

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