[cf341b4] | 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 |
|
---|
[0aeb696] | 7 | <!-- Inserted as a reminder to do this. The mention of a test suite
|
---|
| 8 | is usually right before the root user installation commands. Please
|
---|
| 9 | delete these 12 (including one blank) lines after you are done.-->
|
---|
| 10 |
|
---|
| 11 | <!-- Use one of the two mentions below about a test suite,
|
---|
| 12 | delete the line that is not applicable. Of course, if the
|
---|
| 13 | test suite uses syntax other than "make check", revise the
|
---|
| 14 | line to reflect the actual syntax to run the test suite -->
|
---|
| 15 |
|
---|
| 16 | <!-- <para>This package does not come with a test suite.</para> -->
|
---|
| 17 | <!-- <para>To test the results, issue: <command>make check</command>.</para> -->
|
---|
| 18 |
|
---|
[cf341b4] | 19 | <!ENTITY sudo-download-http "http://www.courtesan.com/sudo/dist/sudo-&sudo-version;.tar.gz">
|
---|
| 20 | <!ENTITY sudo-download-ftp " ">
|
---|
| 21 | <!ENTITY sudo-md5sum "b29893c06192df6230dd5f340f3badf5">
|
---|
| 22 | <!ENTITY sudo-size "576 KB">
|
---|
| 23 | <!ENTITY sudo-buildsize "3.6 MB">
|
---|
| 24 | <!ENTITY sudo-time "less than 0.1 SBU">
|
---|
| 25 | ]>
|
---|
| 26 |
|
---|
| 27 | <sect1 id="sudo" xreflabel="sudo-&sudo-version;">
|
---|
| 28 | <?dbhtml filename="sudo.html"?>
|
---|
| 29 |
|
---|
| 30 | <sect1info>
|
---|
[e19ad480] | 31 | <othername>$LastChangedBy$</othername>
|
---|
| 32 | <date>$Date$</date>
|
---|
| 33 | <keywordset>
|
---|
| 34 | <keyword role="package">sudo-&sudo-version;.tar</keyword>
|
---|
[9084c2eb] | 35 | <keyword role="ftpdir">sudo</keyword>
|
---|
[e19ad480] | 36 | </keywordset>
|
---|
[cf341b4] | 37 | </sect1info>
|
---|
| 38 |
|
---|
| 39 | <title>Sudo-&sudo-version;</title>
|
---|
| 40 |
|
---|
| 41 | <indexterm zone="sudo">
|
---|
| 42 | <primary sortas="a-sudo">sudo</primary>
|
---|
| 43 | </indexterm>
|
---|
| 44 |
|
---|
| 45 | <sect2 role="package">
|
---|
| 46 | <title>Introduction to Sudo</title>
|
---|
| 47 |
|
---|
| 48 | <para>The <application>sudo</application> package allows a system
|
---|
| 49 | administrator to give certain users (or groups of users) the ability to run
|
---|
[33d90fe] | 50 | some (or all) commands as
|
---|
| 51 | <systemitem class="username">root</systemitem> or another user while
|
---|
| 52 | logging the commands and arguments.</para>
|
---|
[cf341b4] | 53 |
|
---|
| 54 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 55 | <itemizedlist spacing="compact">
|
---|
| 56 | <listitem>
|
---|
| 57 | <para>Download (HTTP): <ulink url="&sudo-download-http;"/></para>
|
---|
| 58 | </listitem>
|
---|
| 59 | <listitem>
|
---|
| 60 | <para>Download (FTP): <ulink url="&sudo-download-ftp;"/></para>
|
---|
| 61 | </listitem>
|
---|
| 62 | <listitem>
|
---|
| 63 | <para>Download MD5 sum: &sudo-md5sum;</para>
|
---|
| 64 | </listitem>
|
---|
| 65 | <listitem>
|
---|
| 66 | <para>Download size: &sudo-size;</para>
|
---|
| 67 | </listitem>
|
---|
| 68 | <listitem>
|
---|
| 69 | <para>Estimated disk space required: &sudo-buildsize;</para>
|
---|
| 70 | </listitem>
|
---|
| 71 | <listitem>
|
---|
| 72 | <para>Estimated build time: &sudo-time;</para>
|
---|
| 73 | </listitem>
|
---|
| 74 | </itemizedlist>
|
---|
| 75 |
|
---|
| 76 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
| 77 | <itemizedlist spacing='compact'>
|
---|
| 78 | <listitem>
|
---|
| 79 | <para>Required patch: <ulink
|
---|
[c8ebc86] | 80 | url="&patch-root;/sudo-&sudo-version;-envvar_fix-1.patch"/></para>
|
---|
[cf341b4] | 81 | </listitem>
|
---|
| 82 | </itemizedlist>
|
---|
[b35e86b2] | 83 | <!--
|
---|
[cf341b4] | 84 | <bridgehead renderas="sect3">Sudo Dependencies</bridgehead>
|
---|
| 85 |
|
---|
| 86 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 87 | -->
|
---|
[b35e86b2] | 88 |
|
---|
[3597eb6] | 89 | <para condition="html" role="usernotes">User Notes:
|
---|
| 90 | <ulink url="&blfs-wiki;/sudo"/></para>
|
---|
| 91 |
|
---|
[cf341b4] | 92 | </sect2>
|
---|
| 93 |
|
---|
| 94 | <sect2 role="installation">
|
---|
| 95 | <title>Installation of Sudo</title>
|
---|
| 96 |
|
---|
| 97 | <para>Install <application>sudo</application> by running
|
---|
| 98 | the following commands:</para>
|
---|
| 99 |
|
---|
[d1c3223] | 100 | <screen><userinput>patch -Np1 -i ../sudo-&sudo-version;-envvar_fix-1.patch &&
|
---|
[b35e86b2] | 101 | ./configure --prefix=/usr --libexecdir=/usr/lib \
|
---|
[74169a7c] | 102 | --enable-noargs-shell --with-ignore-dot --with-all-insults \
|
---|
| 103 | --enable-shell-sets-home &&
|
---|
[cf341b4] | 104 | make</userinput></screen>
|
---|
| 105 |
|
---|
| 106 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 107 |
|
---|
| 108 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
| 109 |
|
---|
| 110 | </sect2>
|
---|
| 111 |
|
---|
| 112 | <sect2 role="commands">
|
---|
| 113 | <title>Command Explanations</title>
|
---|
| 114 |
|
---|
[33d90fe] | 115 | <para><option>--enable-noargs-shell</option>: This switch allows
|
---|
| 116 | <application>sudo</application> to run a shell if invoked with no
|
---|
| 117 | arguments.</para>
|
---|
[cf341b4] | 118 |
|
---|
| 119 | <para><option>--with-ignore-dot</option>: This switch causes
|
---|
| 120 | <application>sudo</application> to ignore '.' in the PATH.</para>
|
---|
| 121 |
|
---|
| 122 | <para><option>--with-all-insults</option>: This switch includes all the
|
---|
[33d90fe] | 123 | <application>sudo</application> insult sets.</para>
|
---|
[cf341b4] | 124 |
|
---|
[74169a7c] | 125 | <para><option>--enable-shell-sets-home</option>: This switch sets HOME to
|
---|
| 126 | the target user in shell mode.</para>
|
---|
| 127 |
|
---|
[33d90fe] | 128 | <note>
|
---|
| 129 | <para>There are many options to <application>sudo</application>'s
|
---|
| 130 | <command>configure</command> command. Check the
|
---|
| 131 | <command>configure --help</command> output for a complete list.</para>
|
---|
| 132 | </note>
|
---|
[cf341b4] | 133 |
|
---|
| 134 | </sect2>
|
---|
| 135 |
|
---|
| 136 | <sect2 role="configuration">
|
---|
| 137 | <title>Configuring Sudo</title>
|
---|
| 138 |
|
---|
| 139 | <sect3 id="sudo-config">
|
---|
| 140 | <title>Config File</title>
|
---|
| 141 |
|
---|
| 142 | <para><filename>/etc/sudoers</filename></para>
|
---|
| 143 |
|
---|
| 144 | <indexterm zone="sudo sudo-config">
|
---|
| 145 | <primary sortas="e-etc-sudoers">/etc/sudoers</primary>
|
---|
| 146 | </indexterm>
|
---|
| 147 |
|
---|
| 148 | </sect3>
|
---|
| 149 |
|
---|
| 150 | <sect3>
|
---|
| 151 | <title>Configuration Information</title>
|
---|
| 152 |
|
---|
| 153 | <para>The <filename>sudoers</filename> file can be quite complicated. It
|
---|
| 154 | is composed of two types of entries: aliases (basically variables) and
|
---|
| 155 | user specifications (which specify who may run what). The installation
|
---|
| 156 | installs a default configuration that has no privileges installed for any
|
---|
| 157 | user.</para>
|
---|
| 158 |
|
---|
| 159 | <para>One example usage is to allow the system administrator to execute
|
---|
| 160 | any program without typing a password each time root privileges are
|
---|
| 161 | needed. This can be configured as:</para>
|
---|
[bccbdaea] | 162 |
|
---|
[cf341b4] | 163 | <screen># User alias specification
|
---|
| 164 | User_Alias ADMIN = YourLoginId
|
---|
| 165 |
|
---|
| 166 | # Allow people in group ADMIN to run all commands without a password
|
---|
| 167 | ADMIN ALL = NOPASSWD: ALL</screen>
|
---|
| 168 |
|
---|
| 169 | <para>For details, see <command>man sudoers</command>.</para>
|
---|
| 170 |
|
---|
[3c0f868f] | 171 | <note>
|
---|
| 172 | <para>The <application>Sudo</application> developers highly recommend
|
---|
| 173 | using the <command>visudo</command> program to edit the
|
---|
| 174 | <filename>sudoers</filename> file. This will provide basic sanity
|
---|
| 175 | checking like syntax parsing and file permission to avoid some possible
|
---|
| 176 | mistakes that could lead to a vulnerable configuration.</para>
|
---|
| 177 | </note>
|
---|
| 178 |
|
---|
[cf341b4] | 179 | </sect3>
|
---|
| 180 |
|
---|
| 181 | </sect2>
|
---|
| 182 |
|
---|
| 183 | <sect2 role="content">
|
---|
| 184 | <title>Contents</title>
|
---|
| 185 |
|
---|
| 186 | <segmentedlist>
|
---|
| 187 | <segtitle>Installed Programs</segtitle>
|
---|
| 188 | <segtitle>Installed Library</segtitle>
|
---|
| 189 | <segtitle>Installed Directories</segtitle>
|
---|
| 190 |
|
---|
| 191 | <seglistitem>
|
---|
[3c0f868f] | 192 | <seg>sudo, sudoedit, and visudo</seg>
|
---|
[cf341b4] | 193 | <seg>sudo_noexec.so</seg>
|
---|
| 194 | <seg>None</seg>
|
---|
| 195 | </seglistitem>
|
---|
| 196 | </segmentedlist>
|
---|
| 197 |
|
---|
| 198 | <variablelist>
|
---|
| 199 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 200 | <?dbfo list-presentation="list"?>
|
---|
| 201 | <?dbhtml list-presentation="table"?>
|
---|
| 202 |
|
---|
| 203 | <varlistentry id="sudo_prog">
|
---|
| 204 | <term><command>sudo</command></term>
|
---|
| 205 | <listitem>
|
---|
| 206 | <para>executes a command as another user as permitted by
|
---|
[33d90fe] | 207 | the <filename>/etc/sudoers</filename> configuration file.
|
---|
[cf341b4] | 208 | </para>
|
---|
| 209 | <indexterm zone="sudo sudo">
|
---|
| 210 | <primary sortas="b-sudo">sudo</primary>
|
---|
| 211 | </indexterm>
|
---|
| 212 | </listitem>
|
---|
| 213 | </varlistentry>
|
---|
| 214 |
|
---|
| 215 | <varlistentry id="sudoedit">
|
---|
| 216 | <term><command>sudoedit</command></term>
|
---|
| 217 | <listitem>
|
---|
| 218 | <para>is a hard link to <command>sudo</command> that implies
|
---|
[33d90fe] | 219 | the <option>-e</option> option to invoke an editor as another
|
---|
| 220 | user.</para>
|
---|
[cf341b4] | 221 | <indexterm zone="sudo sudoedit">
|
---|
| 222 | <primary sortas="b-sudoedit">sudoedit</primary>
|
---|
| 223 | </indexterm>
|
---|
| 224 | </listitem>
|
---|
| 225 | </varlistentry>
|
---|
| 226 |
|
---|
[3c0f868f] | 227 | <varlistentry id="visudo">
|
---|
| 228 | <term><command>visudo</command></term>
|
---|
| 229 | <listitem>
|
---|
| 230 | <para>allows for safer editing of the <filename>sudoers</filename>
|
---|
| 231 | file.</para>
|
---|
| 232 | <indexterm zone="sudo visudo">
|
---|
| 233 | <primary sortas="b-visudo">visudo</primary>
|
---|
| 234 | </indexterm>
|
---|
| 235 | </listitem>
|
---|
| 236 | </varlistentry>
|
---|
| 237 |
|
---|
| 238 |
|
---|
[cf341b4] | 239 | <varlistentry id="sudo_noexec">
|
---|
| 240 | <term><filename class='libraryfile'>sudo_noexec.so</filename></term>
|
---|
| 241 | <listitem>
|
---|
| 242 | <para>enables support for the "noexec" functionality which prevents
|
---|
| 243 | a dynamically-linked program being run by sudo from executing
|
---|
| 244 | another program (think shell escapes).</para>
|
---|
| 245 | <indexterm zone="sudo sudo_noexec">
|
---|
| 246 | <primary sortas="c-sudo_noexec">sudo_noexec.so</primary>
|
---|
| 247 | </indexterm>
|
---|
| 248 | </listitem>
|
---|
| 249 | </varlistentry>
|
---|
| 250 |
|
---|
| 251 | </variablelist>
|
---|
| 252 |
|
---|
| 253 | </sect2>
|
---|
| 254 |
|
---|
| 255 | </sect1>
|
---|