source: postlfs/security/sudo.xml@ 3c0f868f

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 6.3 6.3-rc1 6.3-rc2 6.3-rc3 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 3c0f868f was 3c0f868f, checked in by Archaic <archaic@…>, 18 years ago

Removed the obsolete sed in sudo and added a note to use visudo to edit the sudoers file.

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

  • Property mode set to 100644
File size: 7.6 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY sudo-download-http "http://www.courtesan.com/sudo/dist/sudo-&sudo-version;.tar.gz">
8 <!ENTITY sudo-download-ftp " ">
9 <!ENTITY sudo-md5sum "b29893c06192df6230dd5f340f3badf5">
10 <!ENTITY sudo-size "576 KB">
11 <!ENTITY sudo-buildsize "3.6 MB">
12 <!ENTITY sudo-time "less than 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 <keywordset>
22 <keyword role="package">sudo-&sudo-version;.tar</keyword>
23 <keyword role="ftpdir">sudo</keyword>
24 </keywordset>
25 </sect1info>
26
27 <title>Sudo-&sudo-version;</title>
28
29 <indexterm zone="sudo">
30 <primary sortas="a-sudo">sudo</primary>
31 </indexterm>
32
33 <sect2 role="package">
34 <title>Introduction to Sudo</title>
35
36 <para>The <application>sudo</application> package allows a system
37 administrator to give certain users (or groups of users) the ability to run
38 some (or all) commands as
39 <systemitem class="username">root</systemitem> or another user while
40 logging the commands and arguments.</para>
41
42 <bridgehead renderas="sect3">Package Information</bridgehead>
43 <itemizedlist spacing="compact">
44 <listitem>
45 <para>Download (HTTP): <ulink url="&sudo-download-http;"/></para>
46 </listitem>
47 <listitem>
48 <para>Download (FTP): <ulink url="&sudo-download-ftp;"/></para>
49 </listitem>
50 <listitem>
51 <para>Download MD5 sum: &sudo-md5sum;</para>
52 </listitem>
53 <listitem>
54 <para>Download size: &sudo-size;</para>
55 </listitem>
56 <listitem>
57 <para>Estimated disk space required: &sudo-buildsize;</para>
58 </listitem>
59 <listitem>
60 <para>Estimated build time: &sudo-time;</para>
61 </listitem>
62 </itemizedlist>
63
64<!--
65 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
66 <itemizedlist spacing='compact'>
67 <listitem>
68 <para>Required patch: <ulink
69 url="&patch-root;/sudo-&sudo-version;-xxxx-1.patch"/></para>
70 </listitem>
71 </itemizedlist>
72 <bridgehead renderas="sect3">Sudo Dependencies</bridgehead>
73
74 <bridgehead renderas="sect4">Optional</bridgehead>
75
76
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 --libexecdir=/usr/lib \
87 --enable-noargs-shell --with-ignore-dot --with-all-insults \
88 --enable-shell-sets-home &amp;&amp;
89make</userinput></screen>
90
91 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
92
93<screen role="root"><userinput>make install</userinput></screen>
94
95 </sect2>
96
97 <sect2 role="commands">
98 <title>Command Explanations</title>
99
100 <para><option>--enable-noargs-shell</option>: This switch allows
101 <application>sudo</application> to run a shell if invoked with no
102 arguments.</para>
103
104 <para><option>--with-ignore-dot</option>: This switch causes
105 <application>sudo</application> to ignore '.' in the PATH.</para>
106
107 <para><option>--with-all-insults</option>: This switch includes all the
108 <application>sudo</application> insult sets.</para>
109
110 <para><option>--enable-shell-sets-home</option>: This switch sets HOME to
111 the target user in shell mode.</para>
112
113 <note>
114 <para>There are many options to <application>sudo</application>'s
115 <command>configure</command> command. Check the
116 <command>configure --help</command> output for a complete list.</para>
117 </note>
118
119 </sect2>
120
121 <sect2 role="configuration">
122 <title>Configuring Sudo</title>
123
124 <sect3 id="sudo-config">
125 <title>Config File</title>
126
127 <para><filename>/etc/sudoers</filename></para>
128
129 <indexterm zone="sudo sudo-config">
130 <primary sortas="e-etc-sudoers">/etc/sudoers</primary>
131 </indexterm>
132
133 </sect3>
134
135 <sect3>
136 <title>Configuration Information</title>
137
138 <para>The <filename>sudoers</filename> file can be quite complicated. It
139 is composed of two types of entries: aliases (basically variables) and
140 user specifications (which specify who may run what). The installation
141 installs a default configuration that has no privileges installed for any
142 user.</para>
143
144 <para>One example usage is to allow the system administrator to execute
145 any program without typing a password each time root privileges are
146 needed. This can be configured as:</para>
147
148 <screen># User alias specification
149User_Alias ADMIN = YourLoginId
150
151# Allow people in group ADMIN to run all commands without a password
152ADMIN ALL = NOPASSWD: ALL</screen>
153
154 <para>For details, see <command>man sudoers</command>.</para>
155
156 <note>
157 <para>The <application>Sudo</application> developers highly recommend
158 using the <command>visudo</command> program to edit the
159 <filename>sudoers</filename> file. This will provide basic sanity
160 checking like syntax parsing and file permission to avoid some possible
161 mistakes that could lead to a vulnerable configuration.</para>
162 </note>
163
164 </sect3>
165
166 </sect2>
167
168 <sect2 role="content">
169 <title>Contents</title>
170
171 <segmentedlist>
172 <segtitle>Installed Programs</segtitle>
173 <segtitle>Installed Library</segtitle>
174 <segtitle>Installed Directories</segtitle>
175
176 <seglistitem>
177 <seg>sudo, sudoedit, and visudo</seg>
178 <seg>sudo_noexec.so</seg>
179 <seg>None</seg>
180 </seglistitem>
181 </segmentedlist>
182
183 <variablelist>
184 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
185 <?dbfo list-presentation="list"?>
186 <?dbhtml list-presentation="table"?>
187
188 <varlistentry id="sudo_prog">
189 <term><command>sudo</command></term>
190 <listitem>
191 <para>executes a command as another user as permitted by
192 the <filename>/etc/sudoers</filename> configuration file.
193 </para>
194 <indexterm zone="sudo sudo">
195 <primary sortas="b-sudo">sudo</primary>
196 </indexterm>
197 </listitem>
198 </varlistentry>
199
200 <varlistentry id="sudoedit">
201 <term><command>sudoedit</command></term>
202 <listitem>
203 <para>is a hard link to <command>sudo</command> that implies
204 the <option>-e</option> option to invoke an editor as another
205 user.</para>
206 <indexterm zone="sudo sudoedit">
207 <primary sortas="b-sudoedit">sudoedit</primary>
208 </indexterm>
209 </listitem>
210 </varlistentry>
211
212 <varlistentry id="visudo">
213 <term><command>visudo</command></term>
214 <listitem>
215 <para>allows for safer editing of the <filename>sudoers</filename>
216 file.</para>
217 <indexterm zone="sudo visudo">
218 <primary sortas="b-visudo">visudo</primary>
219 </indexterm>
220 </listitem>
221 </varlistentry>
222
223
224 <varlistentry id="sudo_noexec">
225 <term><filename class='libraryfile'>sudo_noexec.so</filename></term>
226 <listitem>
227 <para>enables support for the "noexec" functionality which prevents
228 a dynamically-linked program being run by sudo from executing
229 another program (think shell escapes).</para>
230 <indexterm zone="sudo sudo_noexec">
231 <primary sortas="c-sudo_noexec">sudo_noexec.so</primary>
232 </indexterm>
233 </listitem>
234 </varlistentry>
235
236 </variablelist>
237
238 </sect2>
239
240</sect1>
Note: See TracBrowser for help on using the repository browser.