[0931098] | 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" [
|
---|
[0931098] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[c00932a] | 7 | <!ENTITY openldap-download-http " ">
|
---|
[12949fb] | 8 | <!ENTITY openldap-download-ftp "ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-&openldap-version;.tgz">
|
---|
[f6d40b7d] | 9 | <!ENTITY openldap-md5sum "693ac26de86231f8dcae2b4e9d768e51">
|
---|
[32b1094f] | 10 | <!ENTITY openldap-size "5.4 MB">
|
---|
[f6d40b7d] | 11 | <!ENTITY openldap-buildsize "53 MB (client), 102 MB (server)">
|
---|
| 12 | <!ENTITY openldap-time "0.7 SBU (client), 1.2 SBU (server)">
|
---|
[0931098] | 13 | ]>
|
---|
| 14 |
|
---|
[9a9a0fec] | 15 | <sect1 id="openldap" xreflabel="OpenLDAP-&openldap-version;">
|
---|
[814e53c] | 16 | <?dbhtml filename="openldap.html"?>
|
---|
| 17 |
|
---|
| 18 | <sect1info>
|
---|
| 19 | <othername>$LastChangedBy$</othername>
|
---|
| 20 | <date>$Date$</date>
|
---|
| 21 | </sect1info>
|
---|
| 22 |
|
---|
| 23 | <title>OpenLDAP-&openldap-version;</title>
|
---|
| 24 |
|
---|
| 25 | <indexterm zone="openldap">
|
---|
| 26 | <primary sortas="a-OpenLDAP">OpenLDAP</primary>
|
---|
| 27 | </indexterm>
|
---|
| 28 |
|
---|
| 29 | <sect2 role="package">
|
---|
| 30 | <title>Introduction to OpenLDAP</title>
|
---|
| 31 |
|
---|
[b5e36dd] | 32 | <para>
|
---|
| 33 | The <application>OpenLDAP</application> package provides an open
|
---|
| 34 | source implementation of the Lightweight Directory Access Protocol.
|
---|
| 35 | </para>
|
---|
| 36 |
|
---|
[da28eec0] | 37 | &lfs79_checked;&gcc6_checked;
|
---|
[814e53c] | 38 |
|
---|
| 39 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 40 | <itemizedlist spacing="compact">
|
---|
| 41 | <listitem>
|
---|
[b5e36dd] | 42 | <para>
|
---|
| 43 | Download (HTTP): <ulink url="&openldap-download-http;"/>
|
---|
| 44 | </para>
|
---|
[814e53c] | 45 | </listitem>
|
---|
| 46 | <listitem>
|
---|
[b5e36dd] | 47 | <para>
|
---|
| 48 | Download (FTP): <ulink url="&openldap-download-ftp;"/>
|
---|
| 49 | </para>
|
---|
[814e53c] | 50 | </listitem>
|
---|
| 51 | <listitem>
|
---|
[b5e36dd] | 52 | <para>
|
---|
| 53 | Download MD5 sum: &openldap-md5sum;
|
---|
| 54 | </para>
|
---|
[814e53c] | 55 | </listitem>
|
---|
| 56 | <listitem>
|
---|
[b5e36dd] | 57 | <para>
|
---|
| 58 | Download size: &openldap-size;
|
---|
| 59 | </para>
|
---|
[814e53c] | 60 | </listitem>
|
---|
| 61 | <listitem>
|
---|
[b5e36dd] | 62 | <para>
|
---|
| 63 | Estimated disk space required: &openldap-buildsize;
|
---|
| 64 | </para>
|
---|
[814e53c] | 65 | </listitem>
|
---|
| 66 | <listitem>
|
---|
[b5e36dd] | 67 | <para>
|
---|
| 68 | Estimated build time: &openldap-time;
|
---|
| 69 | </para>
|
---|
[814e53c] | 70 | </listitem>
|
---|
| 71 | </itemizedlist>
|
---|
| 72 |
|
---|
[6a604251] | 73 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
[ba432fd] | 74 | <itemizedlist spacing="compact">
|
---|
| 75 | <listitem>
|
---|
[b5e36dd] | 76 | <para>
|
---|
| 77 | Required patch:
|
---|
[d9a02fd] | 78 | <ulink url="&patch-root;/openldap-&openldap-version;-consolidated-2.patch"/>
|
---|
[b5e36dd] | 79 | </para>
|
---|
[1ef8da9] | 80 | </listitem>
|
---|
[ba432fd] | 81 | </itemizedlist>
|
---|
| 82 |
|
---|
[814e53c] | 83 | <bridgehead renderas="sect3">OpenLDAP Dependencies</bridgehead>
|
---|
| 84 |
|
---|
| 85 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
[b5e36dd] | 86 | <para role="recommended">
|
---|
[fcee45b] | 87 | <xref linkend="cyrus-sasl"/> and
|
---|
[b5e36dd] | 88 | <xref linkend="openssl"/>
|
---|
| 89 | </para>
|
---|
[814e53c] | 90 |
|
---|
| 91 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[b5e36dd] | 92 | <para role="optional">
|
---|
| 93 | <xref linkend="icu"/>,
|
---|
[cedda6d2] | 94 | <xref linkend="pth"/>,
|
---|
| 95 | <xref linkend="unixodbc"/>,
|
---|
[ec06894] | 96 | <xref linkend="mariadb"/> or
|
---|
| 97 | <xref linkend="postgresql"/> or
|
---|
| 98 | <ulink url="http://www.mysql.com/">MySQL</ulink>,
|
---|
[cedda6d2] | 99 | <ulink url="http://www.openslp.org/">OpenSLP</ulink>, and
|
---|
[fcee45b] | 100 | <xref linkend="db"/> (not recommended by the developers)
|
---|
[b5e36dd] | 101 | </para>
|
---|
[814e53c] | 102 |
|
---|
[3cb0c57] | 103 | <para condition="html" role="usernotes">User Notes:
|
---|
[bc6e56d] | 104 | <ulink url="&blfs-wiki;/openldap"/>
|
---|
| 105 | </para>
|
---|
[814e53c] | 106 | </sect2>
|
---|
| 107 |
|
---|
| 108 | <sect2 role="installation">
|
---|
| 109 | <title>Installation of OpenLDAP</title>
|
---|
| 110 |
|
---|
[12949fb] | 111 | <note>
|
---|
[b5e36dd] | 112 | <para>
|
---|
| 113 | If you only need to install the client side <command>ldap*</command>
|
---|
[defca61] | 114 | binaries, corresponding man pages, libraries and header files (referred
|
---|
| 115 | to as a <quote>client-only</quote> install), issue these commands
|
---|
| 116 | instead of the following ones (no test suite available):
|
---|
[b5e36dd] | 117 | </para>
|
---|
[12949fb] | 118 |
|
---|
[d9a02fd] | 119 | <screen><userinput>patch -Np1 -i ../openldap-&openldap-version;-consolidated-2.patch &&
|
---|
[439e942e] | 120 | autoconf &&
|
---|
[983db4c] | 121 |
|
---|
[d6da5da] | 122 | ./configure --prefix=/usr \
|
---|
[12949fb] | 123 | --sysconfdir=/etc \
|
---|
[9ef1b6ff] | 124 | --disable-static \
|
---|
[d6da5da] | 125 | --enable-dynamic \
|
---|
| 126 | --disable-debug \
|
---|
| 127 | --disable-slapd &&
|
---|
[f6d40b7d] | 128 |
|
---|
[d6da5da] | 129 | make depend &&
|
---|
[c612fc3] | 130 | make</userinput></screen>
|
---|
| 131 |
|
---|
| 132 | <para>
|
---|
| 133 | Then, as the <systemitem class="username">root</systemitem> user:
|
---|
| 134 | </para>
|
---|
| 135 |
|
---|
| 136 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
[9ef1b6ff] | 137 |
|
---|
[12949fb] | 138 | </note>
|
---|
[ec06894] | 139 |
|
---|
[defca61] | 140 | <warning>
|
---|
[d9a02fd] | 141 | <para>If upgrading from a previous installation that used Berkeley DB as
|
---|
[defca61] | 142 | the backend, you will need to dump the database(s) using the
|
---|
| 143 | <command>slapcat</command> utility, relocate all files in
|
---|
| 144 | <filename class="directory">/var/lib/openldap</filename>, change all
|
---|
| 145 | instances of <option>bdb</option> to <option>mdb</option> in
|
---|
| 146 | <filename>/etc/openldap/slapd.conf</filename> and any files in
|
---|
| 147 | <filename class="directory">/etc/openldap/slapd.d</filename>, and import
|
---|
| 148 | using the <command>slapadd</command> utility after the installation is
|
---|
| 149 | completed.
|
---|
| 150 | </para>
|
---|
| 151 | </warning>
|
---|
[12949fb] | 152 |
|
---|
[b194f2b] | 153 | <para>
|
---|
| 154 | There should be a dedicated user and group to take control
|
---|
| 155 | of the <command>slapd</command> daemon after it is
|
---|
| 156 | started. Issue the following commands as the
|
---|
| 157 | <systemitem class="username">root</systemitem> user:
|
---|
| 158 | </para>
|
---|
| 159 |
|
---|
| 160 | <screen role="root"><userinput>groupadd -g 83 ldap &&
|
---|
[68d5b0e] | 161 | useradd -c "OpenLDAP Daemon Owner" \
|
---|
| 162 | -d /var/lib/openldap -u 83 \
|
---|
| 163 | -g ldap -s /bin/false ldap</userinput></screen>
|
---|
[b194f2b] | 164 |
|
---|
[b5e36dd] | 165 | <para>
|
---|
| 166 | Install <application>OpenLDAP</application> by
|
---|
| 167 | running the following commands:
|
---|
| 168 | </para>
|
---|
[814e53c] | 169 |
|
---|
[d9a02fd] | 170 | <screen><userinput>patch -Np1 -i ../openldap-&openldap-version;-consolidated-2.patch &&
|
---|
[439e942e] | 171 | autoconf &&
|
---|
[983db4c] | 172 |
|
---|
[d6da5da] | 173 | ./configure --prefix=/usr \
|
---|
| 174 | --sysconfdir=/etc \
|
---|
| 175 | --localstatedir=/var \
|
---|
[c00932a] | 176 | --libexecdir=/usr/lib \
|
---|
[d6da5da] | 177 | --disable-static \
|
---|
| 178 | --disable-debug \
|
---|
[fcee45b] | 179 | --with-tls=openssl \
|
---|
| 180 | --with-cyrus-sasl \
|
---|
[d6da5da] | 181 | --enable-dynamic \
|
---|
| 182 | --enable-crypt \
|
---|
| 183 | --enable-spasswd \
|
---|
[fcee45b] | 184 | --enable-slapd \
|
---|
[d6da5da] | 185 | --enable-modules \
|
---|
[c00932a] | 186 | --enable-backends=mod \
|
---|
[d6da5da] | 187 | --disable-ndb \
|
---|
[fcee45b] | 188 | --disable-sql \
|
---|
[97684fbc] | 189 | --disable-shell \
|
---|
| 190 | --disable-bdb \
|
---|
| 191 | --disable-hdb \
|
---|
[defca61] | 192 | --enable-overlays=mod &&
|
---|
[fcee45b] | 193 |
|
---|
[0931098] | 194 | make depend &&
|
---|
[d9091faa] | 195 | make</userinput></screen>
|
---|
| 196 |
|
---|
[b5e36dd] | 197 | <para>
|
---|
[9266f172] | 198 | The tests appear to be fragile. Errors may cause the tests to abort
|
---|
[ec06894] | 199 | prior to finishing, apparently due to timing issues. The tests
|
---|
[9266f172] | 200 | take about 65 minutes and are processor independent.
|
---|
[ec06894] | 201 | To test the results, issue: <command>make test</command>.
|
---|
[b5e36dd] | 202 | </para>
|
---|
[814e53c] | 203 |
|
---|
[b5e36dd] | 204 | <para>
|
---|
| 205 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 206 | </para>
|
---|
[814e53c] | 207 |
|
---|
| 208 | <screen role="root"><userinput>make install &&
|
---|
[0c74155e] | 209 |
|
---|
[6b52571] | 210 | install -v -dm700 -o ldap -g ldap /var/lib/openldap &&
|
---|
[f6d40b7d] | 211 |
|
---|
[defca61] | 212 | install -v -dm700 -o ldap -g ldap /etc/openldap/slapd.d &&
|
---|
[68d5b0e] | 213 | chmod -v 640 /etc/openldap/slapd.{conf,ldif} &&
|
---|
| 214 | chown -v root:ldap /etc/openldap/slapd.{conf,ldif} &&
|
---|
[b194f2b] | 215 |
|
---|
[68d5b0e] | 216 | install -v -dm755 /usr/share/doc/openldap-&openldap-version; &&
|
---|
| 217 | cp -vfr doc/{drafts,rfc,guide} \
|
---|
| 218 | /usr/share/doc/openldap-&openldap-version;</userinput></screen>
|
---|
[117309d] | 219 |
|
---|
[814e53c] | 220 | </sect2>
|
---|
| 221 |
|
---|
| 222 | <sect2 role="commands">
|
---|
| 223 | <title>Command Explanations</title>
|
---|
| 224 |
|
---|
[c00932a] | 225 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
[b5e36dd] | 226 | href="../../xincludes/static-libraries.xml"/>
|
---|
| 227 |
|
---|
| 228 | <para>
|
---|
[9ef1b6ff] | 229 | <parameter>--disable-debug</parameter>: This switch disables
|
---|
[b5e36dd] | 230 | the debugging code in <application>OpenLDAP</application>.
|
---|
| 231 | </para>
|
---|
| 232 |
|
---|
| 233 | <para>
|
---|
[9ef1b6ff] | 234 | <parameter>--enable-dynamic</parameter>: This switch forces the
|
---|
[b5e36dd] | 235 | <application>OpenLDAP</application> libraries to be dynamically
|
---|
| 236 | linked to the executable programs.
|
---|
| 237 | </para>
|
---|
| 238 |
|
---|
| 239 | <para>
|
---|
[9ef1b6ff] | 240 | <parameter>--enable-crypt</parameter>: This switch enables using of
|
---|
[b5e36dd] | 241 | <command>crypt(3)</command> passwords.
|
---|
| 242 | </para>
|
---|
| 243 |
|
---|
| 244 | <para>
|
---|
[9ef1b6ff] | 245 | <parameter>--enable-spasswd</parameter>: This switch enables
|
---|
[d6da5da] | 246 | <application>SASL</application> password verification.
|
---|
| 247 | </para>
|
---|
| 248 |
|
---|
| 249 | <para>
|
---|
[9ef1b6ff] | 250 | <parameter>--enable-modules</parameter>: This switch enables dynamic
|
---|
[b5e36dd] | 251 | module support.
|
---|
| 252 | </para>
|
---|
| 253 |
|
---|
| 254 | <para>
|
---|
[9ef1b6ff] | 255 | <parameter>--enable-rlookups</parameter>: This switch enables
|
---|
[b5e36dd] | 256 | reverse lookups of client hostnames.
|
---|
| 257 | </para>
|
---|
| 258 |
|
---|
| 259 | <para>
|
---|
[9ef1b6ff] | 260 | <parameter>--enable-backends</parameter>: This switch enables
|
---|
[b5e36dd] | 261 | all available backends.
|
---|
| 262 | </para>
|
---|
| 263 |
|
---|
| 264 | <para>
|
---|
[9ef1b6ff] | 265 | <parameter>--enable-overlays</parameter>: This switch enables
|
---|
[b5e36dd] | 266 | all available overlays.
|
---|
| 267 | </para>
|
---|
| 268 |
|
---|
| 269 | <para>
|
---|
[9ef1b6ff] | 270 | <parameter>--disable-ndb</parameter>: This switch disables
|
---|
[0d7900a] | 271 | <application>MySQL</application> NDB Cluster backend
|
---|
[b5e36dd] | 272 | which causes configure to fail if
|
---|
| 273 | <application>MySQL</application> is present.
|
---|
| 274 | </para>
|
---|
| 275 |
|
---|
| 276 | <para>
|
---|
[9ef1b6ff] | 277 | <parameter>--disable-sql</parameter>: This switch explicitly
|
---|
[b5e36dd] | 278 | disables the SQL backend. Omit this switch if a SQL server is
|
---|
| 279 | installed and you are going to use a SQL backend.
|
---|
| 280 | </para>
|
---|
| 281 |
|
---|
[67bd7d46] | 282 | <para>
|
---|
| 283 | <parameter>--libexecdir=/usr/lib</parameter>: This switch controls where
|
---|
| 284 | the <filename class="directory">/usr/lib/openldap</filename> directory is
|
---|
| 285 | installed. Everything in that directory is a library, so it belongs under
|
---|
| 286 | <filename class="directory">/usr/lib</filename> instead of
|
---|
| 287 | <filename class="directory">/usr/libexec</filename>.
|
---|
| 288 | </para>
|
---|
| 289 |
|
---|
[b5e36dd] | 290 | <para>
|
---|
[d6da5da] | 291 | <option>--enable-slp</option>: This switch enables
|
---|
| 292 | SLPv2 support. Use it if you have installed
|
---|
[b5e36dd] | 293 | <ulink url="http://www.openslp.org/">OpenSLP</ulink>.
|
---|
| 294 | </para>
|
---|
[ec06894] | 295 |
|
---|
[516a4acd] | 296 | <note>
|
---|
[b5e36dd] | 297 | <para>
|
---|
| 298 | You can run <command>./configure --help</command> to see if there
|
---|
[d6da5da] | 299 | are other switch you can pass to the <command>configure</command>
|
---|
[b5e36dd] | 300 | command to enable other options or dependency packages.
|
---|
| 301 | </para>
|
---|
[516a4acd] | 302 | </note>
|
---|
| 303 |
|
---|
[6b52571] | 304 | <para>
|
---|
| 305 | <command>install ...</command>, <command>chown ...</command>,
|
---|
| 306 | and <command>chmod ...</command>:
|
---|
| 307 | Having slapd configuration files and ldap databases in /var/lib/openldap
|
---|
| 308 | readable by anyone is a SECURITY ISSUE, especially since a file stores the
|
---|
| 309 | admin password in PLAIN TEXT. That's why mode 640 and root:ldap ownership
|
---|
| 310 | were used. The owner is root, so only root can modify the file, and group is
|
---|
| 311 | ldap, so that the group which owns slapd daemon could read but not modify
|
---|
[ec06894] | 312 | the file in case of a security breach.
|
---|
[6b52571] | 313 | </para>
|
---|
| 314 |
|
---|
[814e53c] | 315 | </sect2>
|
---|
| 316 |
|
---|
| 317 | <sect2 role="configuration">
|
---|
| 318 | <title>Configuring OpenLDAP</title>
|
---|
| 319 |
|
---|
| 320 | <sect3 id="openldap-config">
|
---|
| 321 | <title>Config Files</title>
|
---|
| 322 |
|
---|
[bc6e56d] | 323 | <para>
|
---|
| 324 | <filename>/etc/openldap/*</filename>
|
---|
| 325 | </para>
|
---|
[814e53c] | 326 |
|
---|
| 327 | <indexterm zone="openldap openldap-config">
|
---|
[bc6e56d] | 328 | <primary sortas="e-etc-openldap">/etc/openldap/*</primary>
|
---|
[814e53c] | 329 | </indexterm>
|
---|
| 330 |
|
---|
| 331 | </sect3>
|
---|
| 332 |
|
---|
| 333 | <sect3>
|
---|
| 334 | <title>Configuration Information</title>
|
---|
| 335 |
|
---|
[b5e36dd] | 336 | <para>
|
---|
| 337 | Configuring the <command>slapd</command> servers can be complex.
|
---|
| 338 | Securing the LDAP directory, especially if you are storing non-public
|
---|
| 339 | data such as password databases, can also be a challenging task. You'll
|
---|
| 340 | need to modify the <filename>/etc/openldap/slapd.conf</filename> and
|
---|
| 341 | <filename>/etc/openldap/ldap.conf</filename> files to set up
|
---|
| 342 | <application>OpenLDAP</application> for your particular needs.
|
---|
| 343 | </para>
|
---|
[814e53c] | 344 |
|
---|
[d9a02fd] | 345 | <note>
|
---|
| 346 | <para>
|
---|
| 347 | The instructions above install an empty LDAP structure and a default
|
---|
| 348 | <filename>/etc/openldap/slapd.conf</filename> file, which are
|
---|
| 349 | suitable for testing the build and other packages using LDAP. Do not
|
---|
| 350 | use them on a production server.
|
---|
| 351 | </para>
|
---|
| 352 | </note>
|
---|
[814e53c] | 353 | <indexterm zone="openldap openldap-config">
|
---|
| 354 | <primary
|
---|
| 355 | sortas="e-etc-openldap-slapd.conf">/etc/openldap/slapd.conf</primary>
|
---|
| 356 | </indexterm>
|
---|
| 357 |
|
---|
| 358 | <indexterm zone="openldap openldap-config">
|
---|
| 359 | <primary
|
---|
| 360 | sortas="e-etc-openldap-ldap.conf">/etc/openldap/ldap.conf</primary>
|
---|
| 361 | </indexterm>
|
---|
| 362 |
|
---|
[bc6e56d] | 363 | <para>
|
---|
| 364 | Resources to assist you with topics such as choosing a directory
|
---|
| 365 | configuration, backend and database definitions, access control settings,
|
---|
| 366 | running as a user other than <systemitem class="username">root</systemitem>
|
---|
| 367 | and setting a <command>chroot</command> environment include:
|
---|
| 368 | </para>
|
---|
[814e53c] | 369 |
|
---|
[d6da5da] | 370 | <itemizedlist spacing="compact">
|
---|
[814e53c] | 371 | <listitem>
|
---|
[b5e36dd] | 372 | <para>
|
---|
| 373 | The <command>slapd</command> man page.
|
---|
| 374 | </para>
|
---|
[814e53c] | 375 | </listitem>
|
---|
| 376 | <listitem>
|
---|
[b5e36dd] | 377 | <para>
|
---|
| 378 | The <filename>slapd.conf</filename> man page.
|
---|
| 379 | </para>
|
---|
[814e53c] | 380 | </listitem>
|
---|
| 381 | <listitem>
|
---|
[b5e36dd] | 382 | <para>
|
---|
[6b52571] | 383 | The <ulink url="http://www.openldap.org/doc/admin24/"> OpenLDAP 2.4
|
---|
[ec06894] | 384 | Administrator's Guide</ulink> (also installed locally in
|
---|
[6b52571] | 385 | <filename class='directory'>
|
---|
[b5e36dd] | 386 | /usr/share/doc/openldap-&openldap-version;/guide/admin</filename>).
|
---|
| 387 | </para>
|
---|
[814e53c] | 388 | </listitem>
|
---|
| 389 | <listitem>
|
---|
[b5e36dd] | 390 | <para>
|
---|
| 391 | Documents located at
|
---|
| 392 | <ulink url="http://www.openldap.org/pub/"/>.
|
---|
| 393 | </para>
|
---|
[814e53c] | 394 | </listitem>
|
---|
| 395 | </itemizedlist>
|
---|
| 396 |
|
---|
| 397 | </sect3>
|
---|
| 398 |
|
---|
| 399 | <sect3>
|
---|
| 400 | <title>Mozilla Address Directory</title>
|
---|
| 401 |
|
---|
[b5e36dd] | 402 | <para>
|
---|
| 403 | By default, LDAPv2 support is disabled in the
|
---|
| 404 | <filename>slapd.conf</filename> file. Once the database is properly
|
---|
| 405 | set up and <application>Mozilla</application> is configured to use the
|
---|
| 406 | directory, you must add <option>allow bind_v2</option> to the
|
---|
| 407 | <filename>slapd.conf</filename> file.
|
---|
| 408 | </para>
|
---|
[814e53c] | 409 |
|
---|
| 410 | </sect3>
|
---|
| 411 |
|
---|
| 412 | <sect3 id="openldap-init">
|
---|
[1258125] | 413 | <title><phrase revision="sysv">Boot Script</phrase>
|
---|
| 414 | <phrase revision="systemd">Systemd Unit</phrase></title>
|
---|
[814e53c] | 415 |
|
---|
[b5e36dd] | 416 | <para>
|
---|
| 417 | To automate the startup of the LDAP server at system bootup,
|
---|
[1258125] | 418 | install the
|
---|
| 419 | <phrase revision="sysv"><filename>/etc/rc.d/init.d/slapd</filename>
|
---|
| 420 | init script</phrase>
|
---|
| 421 | <phrase revision="systemd"><filename>slapd.service</filename>
|
---|
| 422 | unit</phrase> included in the
|
---|
| 423 | <xref linkend="bootscripts" revision="sysv"/>
|
---|
| 424 | <xref linkend="systemd-units" revision="systemd"/>
|
---|
| 425 | package using the following command:
|
---|
[b5e36dd] | 426 | </para>
|
---|
[814e53c] | 427 |
|
---|
| 428 | <indexterm zone="openldap openldap-init">
|
---|
[d9d26317] | 429 | <primary sortas="f-slapd">slapd</primary>
|
---|
[814e53c] | 430 | </indexterm>
|
---|
| 431 |
|
---|
[d9d26317] | 432 | <screen role="root"><userinput>make install-slapd</userinput></screen>
|
---|
[814e53c] | 433 |
|
---|
| 434 | <note>
|
---|
[b5e36dd] | 435 | <para>
|
---|
[0d7900a] | 436 | You'll need to modify the
|
---|
[1258125] | 437 | <phrase revision="sysv"><filename>/etc/sysconfig/slapd</filename></phrase>
|
---|
| 438 | <phrase revision="systemd"><filename>/etc/default/slapd</filename></phrase>
|
---|
| 439 | to include the parameters needed for your specific configuration. See
|
---|
| 440 | the <command>slapd</command> man page for parameter information.
|
---|
[b5e36dd] | 441 | </para>
|
---|
[814e53c] | 442 | </note>
|
---|
| 443 |
|
---|
| 444 | </sect3>
|
---|
| 445 |
|
---|
| 446 | <sect3>
|
---|
| 447 | <title>Testing the Configuration</title>
|
---|
| 448 |
|
---|
[b5e36dd] | 449 | <para>
|
---|
[1258125] | 450 | Start the LDAP server using
|
---|
| 451 | <phrase revision="sysv">the init script:</phrase>
|
---|
| 452 | <phrase revision="systemd">systemctl:</phrase>
|
---|
[b5e36dd] | 453 | </para>
|
---|
[814e53c] | 454 |
|
---|
[1258125] | 455 | <screen role="root" revision="sysv"><userinput>/etc/rc.d/init.d/slapd start</userinput></screen>
|
---|
| 456 |
|
---|
| 457 | <screen role="root" revision="systemd"><userinput>systemctl start slapd</userinput></screen>
|
---|
[814e53c] | 458 |
|
---|
[b5e36dd] | 459 | <para>
|
---|
| 460 | Verify access to the LDAP server with the following command:
|
---|
| 461 | </para>
|
---|
[814e53c] | 462 |
|
---|
| 463 | <screen><userinput>ldapsearch -x -b '' -s base '(objectclass=*)' namingContexts</userinput></screen>
|
---|
| 464 |
|
---|
[b5e36dd] | 465 | <para>
|
---|
| 466 | The expected result is:
|
---|
| 467 | </para>
|
---|
[814e53c] | 468 |
|
---|
[0931098] | 469 | <screen><computeroutput># extended LDIF
|
---|
| 470 | #
|
---|
| 471 | # LDAPv3
|
---|
[6b52571] | 472 | # base <> with scope baseObject
|
---|
[0931098] | 473 | # filter: (objectclass=*)
|
---|
[814e53c] | 474 | # requesting: namingContexts
|
---|
[0931098] | 475 | #
|
---|
| 476 |
|
---|
| 477 | #
|
---|
| 478 | dn:
|
---|
| 479 | namingContexts: dc=my-domain,dc=com
|
---|
| 480 |
|
---|
| 481 | # search result
|
---|
| 482 | search: 2
|
---|
| 483 | result: 0 Success
|
---|
| 484 |
|
---|
| 485 | # numResponses: 2
|
---|
| 486 | # numEntries: 1</computeroutput></screen>
|
---|
| 487 |
|
---|
[814e53c] | 488 | </sect3>
|
---|
| 489 |
|
---|
| 490 | </sect2>
|
---|
| 491 |
|
---|
| 492 | <sect2 role="content">
|
---|
| 493 | <title>Contents</title>
|
---|
| 494 |
|
---|
| 495 | <segmentedlist>
|
---|
| 496 | <segtitle>Installed Programs</segtitle>
|
---|
| 497 | <segtitle>Installed Libraries</segtitle>
|
---|
| 498 | <segtitle>Installed Directories</segtitle>
|
---|
| 499 |
|
---|
| 500 | <seglistitem>
|
---|
[b5e36dd] | 501 | <seg>
|
---|
| 502 | ldapadd, ldapcompare, ldapdelete, ldapexop, ldapmodify, ldapmodrdn,
|
---|
[4585084d] | 503 | ldappasswd, ldapsearch, ldapurl, ldapwhoami, slapacl, slapadd,
|
---|
| 504 | slapauth, slapcat, slapd, slapdn, slapindex, slappasswd, slapschema,
|
---|
| 505 | and slaptest
|
---|
[b5e36dd] | 506 | </seg>
|
---|
| 507 | <seg>
|
---|
[4585084d] | 508 | liblber.so, libldap.so, libldap_r.so,
|
---|
| 509 | and several under /usr/lib/openldap
|
---|
[b5e36dd] | 510 | </seg>
|
---|
| 511 | <seg>
|
---|
[52e175b] | 512 | /etc/openldap,
|
---|
| 513 | /{usr,var}/lib/openldap, and
|
---|
[68d5b0e] | 514 | /usr/share/doc/openldap-&openldap-version;
|
---|
[b5e36dd] | 515 | </seg>
|
---|
[814e53c] | 516 | </seglistitem>
|
---|
| 517 | </segmentedlist>
|
---|
| 518 |
|
---|
| 519 | <variablelist>
|
---|
| 520 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 521 | <?dbfo list-presentation="list"?>
|
---|
| 522 | <?dbhtml list-presentation="table"?>
|
---|
| 523 |
|
---|
| 524 | <varlistentry id="ldapadd">
|
---|
| 525 | <term><command>ldapadd</command></term>
|
---|
| 526 | <listitem>
|
---|
[b5e36dd] | 527 | <para>
|
---|
| 528 | opens a connection to an LDAP server, binds and adds entries.
|
---|
| 529 | </para>
|
---|
[814e53c] | 530 | <indexterm zone="openldap ldapadd">
|
---|
| 531 | <primary sortas="b-ldapadd">ldapadd</primary>
|
---|
| 532 | </indexterm>
|
---|
| 533 | </listitem>
|
---|
| 534 | </varlistentry>
|
---|
| 535 |
|
---|
| 536 | <varlistentry id="ldapcompare">
|
---|
| 537 | <term><command>ldapcompare</command></term>
|
---|
| 538 | <listitem>
|
---|
[b5e36dd] | 539 | <para>
|
---|
| 540 | opens a connection to an LDAP server, binds and performs
|
---|
| 541 | a compare using specified parameters.
|
---|
| 542 | </para>
|
---|
[814e53c] | 543 | <indexterm zone="openldap ldapcompare">
|
---|
| 544 | <primary sortas="b-ldapcompare">ldapcompare</primary>
|
---|
| 545 | </indexterm>
|
---|
| 546 | </listitem>
|
---|
| 547 | </varlistentry>
|
---|
| 548 |
|
---|
| 549 | <varlistentry id="ldapdelete">
|
---|
| 550 | <term><command>ldapdelete</command></term>
|
---|
| 551 | <listitem>
|
---|
[b5e36dd] | 552 | <para>
|
---|
| 553 | opens a connection to an LDAP server, binds and deletes
|
---|
| 554 | one or more entries.
|
---|
| 555 | </para>
|
---|
[814e53c] | 556 | <indexterm zone="openldap ldapdelete">
|
---|
| 557 | <primary sortas="b-ldapdelete">ldapdelete</primary>
|
---|
| 558 | </indexterm>
|
---|
| 559 | </listitem>
|
---|
| 560 | </varlistentry>
|
---|
| 561 |
|
---|
[c00932a] | 562 | <varlistentry id="ldapexop">
|
---|
| 563 | <term><command>ldapexop</command></term>
|
---|
| 564 | <listitem>
|
---|
[b5e36dd] | 565 | <para>
|
---|
[0d7900a] | 566 | issues the LDAP extended operation specified by
|
---|
[b5e36dd] | 567 | oid or one of the special keywords whoami,
|
---|
| 568 | cancel, or refresh.
|
---|
| 569 | </para>
|
---|
[c00932a] | 570 | <indexterm zone="openldap ldapexop">
|
---|
| 571 | <primary sortas="b-ldapexop">ldapexop</primary>
|
---|
| 572 | </indexterm>
|
---|
| 573 | </listitem>
|
---|
| 574 | </varlistentry>
|
---|
| 575 |
|
---|
[814e53c] | 576 | <varlistentry id="ldapmodify">
|
---|
| 577 | <term><command>ldapmodify</command></term>
|
---|
| 578 | <listitem>
|
---|
[b5e36dd] | 579 | <para>
|
---|
| 580 | opens a connection to an LDAP server, binds and modifies entries.
|
---|
| 581 | </para>
|
---|
[814e53c] | 582 | <indexterm zone="openldap ldapmodify">
|
---|
| 583 | <primary sortas="b-ldapmodify">ldapmodify</primary>
|
---|
| 584 | </indexterm>
|
---|
| 585 | </listitem>
|
---|
| 586 | </varlistentry>
|
---|
| 587 |
|
---|
| 588 | <varlistentry id="ldapmodrdn">
|
---|
| 589 | <term><command>ldapmodrdn</command></term>
|
---|
| 590 | <listitem>
|
---|
[b5e36dd] | 591 | <para>
|
---|
| 592 | opens a connection to an LDAP server, binds and modifies
|
---|
| 593 | the RDN of entries.
|
---|
| 594 | </para>
|
---|
[814e53c] | 595 | <indexterm zone="openldap ldapmodrdn">
|
---|
| 596 | <primary sortas="b-ldapmodrdn">ldapmodrdn</primary>
|
---|
| 597 | </indexterm>
|
---|
| 598 | </listitem>
|
---|
| 599 | </varlistentry>
|
---|
| 600 |
|
---|
| 601 | <varlistentry id="ldappasswd">
|
---|
| 602 | <term><command>ldappasswd</command></term>
|
---|
| 603 | <listitem>
|
---|
[b5e36dd] | 604 | <para>
|
---|
| 605 | is a tool used to set the password of an LDAP user.
|
---|
| 606 | </para>
|
---|
[814e53c] | 607 | <indexterm zone="openldap ldappasswd">
|
---|
| 608 | <primary sortas="b-ldappasswd">ldappasswd</primary>
|
---|
| 609 | </indexterm>
|
---|
| 610 | </listitem>
|
---|
| 611 | </varlistentry>
|
---|
| 612 |
|
---|
| 613 | <varlistentry id="ldapsearch">
|
---|
| 614 | <term><command>ldapsearch</command></term>
|
---|
| 615 | <listitem>
|
---|
[b5e36dd] | 616 | <para>
|
---|
| 617 | opens a connection to an LDAP server, binds and performs
|
---|
| 618 | a search using specified parameters.
|
---|
| 619 | </para>
|
---|
[814e53c] | 620 | <indexterm zone="openldap ldapsearch">
|
---|
| 621 | <primary sortas="b-ldapsearch">ldapsearch</primary>
|
---|
| 622 | </indexterm>
|
---|
| 623 | </listitem>
|
---|
| 624 | </varlistentry>
|
---|
| 625 |
|
---|
[c00932a] | 626 | <varlistentry id="ldapurl">
|
---|
| 627 | <term><command>ldapurl</command></term>
|
---|
| 628 | <listitem>
|
---|
[b5e36dd] | 629 | <para>
|
---|
[0d7900a] | 630 | is a command that allows to either compose or
|
---|
[b5e36dd] | 631 | decompose LDAP URIs.
|
---|
| 632 | </para>
|
---|
[c00932a] | 633 | <indexterm zone="openldap ldapurl">
|
---|
| 634 | <primary sortas="b-ldapurl">ldapurl</primary>
|
---|
| 635 | </indexterm>
|
---|
| 636 | </listitem>
|
---|
| 637 | </varlistentry>
|
---|
| 638 |
|
---|
[814e53c] | 639 | <varlistentry id="ldapwhoami">
|
---|
| 640 | <term><command>ldapwhoami</command></term>
|
---|
| 641 | <listitem>
|
---|
[b5e36dd] | 642 | <para>
|
---|
| 643 | opens a connection to an LDAP server, binds and displays
|
---|
| 644 | whoami information.
|
---|
| 645 | </para>
|
---|
[814e53c] | 646 | <indexterm zone="openldap ldapwhoami">
|
---|
| 647 | <primary sortas="b-ldapwhoami">ldapwhoami</primary>
|
---|
| 648 | </indexterm>
|
---|
| 649 | </listitem>
|
---|
| 650 | </varlistentry>
|
---|
| 651 |
|
---|
[c00932a] | 652 | <varlistentry id="slapacl">
|
---|
| 653 | <term><command>slapacl</command></term>
|
---|
| 654 | <listitem>
|
---|
[b5e36dd] | 655 | <para>
|
---|
[0d7900a] | 656 | is used to check the behavior of slapd by verifying
|
---|
| 657 | access to directory data according to the access control
|
---|
[b5e36dd] | 658 | list directives defined in its configuration.
|
---|
| 659 | </para>
|
---|
[c00932a] | 660 | <indexterm zone="openldap slapacl">
|
---|
| 661 | <primary sortas="b-slapacl">slapacl</primary>
|
---|
| 662 | </indexterm>
|
---|
| 663 | </listitem>
|
---|
| 664 | </varlistentry>
|
---|
| 665 |
|
---|
[814e53c] | 666 | <varlistentry id="slapadd">
|
---|
| 667 | <term><command>slapadd</command></term>
|
---|
| 668 | <listitem>
|
---|
[b5e36dd] | 669 | <para>
|
---|
| 670 | is used to add entries specified in LDAP Directory Interchange
|
---|
| 671 | Format (LDIF) to an LDAP database.
|
---|
| 672 | </para>
|
---|
[814e53c] | 673 | <indexterm zone="openldap slapadd">
|
---|
| 674 | <primary sortas="b-slapadd">slapadd</primary>
|
---|
| 675 | </indexterm>
|
---|
| 676 | </listitem>
|
---|
| 677 | </varlistentry>
|
---|
| 678 |
|
---|
[c00932a] | 679 | <varlistentry id="slapauth">
|
---|
| 680 | <term><command>slapauth</command></term>
|
---|
| 681 | <listitem>
|
---|
[b5e36dd] | 682 | <para>
|
---|
[0d7900a] | 683 | is used to check the behavior of the slapd
|
---|
[b5e36dd] | 684 | in mapping identities for authentication and
|
---|
| 685 | authorization purposes, as specified in slapd.conf.
|
---|
| 686 | </para>
|
---|
[c00932a] | 687 | <indexterm zone="openldap slapauth">
|
---|
| 688 | <primary sortas="b-slapauth">slapauth</primary>
|
---|
| 689 | </indexterm>
|
---|
| 690 | </listitem>
|
---|
| 691 | </varlistentry>
|
---|
| 692 |
|
---|
[814e53c] | 693 | <varlistentry id="slapcat">
|
---|
| 694 | <term><command>slapcat</command></term>
|
---|
| 695 | <listitem>
|
---|
[b5e36dd] | 696 | <para>
|
---|
| 697 | is used to generate an LDAP LDIF output based upon the
|
---|
| 698 | contents of a slapd database.
|
---|
| 699 | </para>
|
---|
[814e53c] | 700 | <indexterm zone="openldap slapcat">
|
---|
| 701 | <primary sortas="b-slapcat">slapcat</primary>
|
---|
| 702 | </indexterm>
|
---|
| 703 | </listitem>
|
---|
| 704 | </varlistentry>
|
---|
| 705 |
|
---|
| 706 | <varlistentry id="slapd">
|
---|
| 707 | <term><command>slapd</command></term>
|
---|
| 708 | <listitem>
|
---|
[b5e36dd] | 709 | <para>
|
---|
| 710 | is the standalone LDAP server.
|
---|
| 711 | </para>
|
---|
[814e53c] | 712 | <indexterm zone="openldap slapd">
|
---|
| 713 | <primary sortas="b-slapd">slapd</primary>
|
---|
| 714 | </indexterm>
|
---|
| 715 | </listitem>
|
---|
| 716 | </varlistentry>
|
---|
| 717 |
|
---|
| 718 | <varlistentry id="slapdn">
|
---|
| 719 | <term><command>slapdn</command></term>
|
---|
| 720 | <listitem>
|
---|
[b5e36dd] | 721 | <para>
|
---|
| 722 | checks a list of string-represented DNs based on schema syntax.
|
---|
| 723 | </para>
|
---|
[814e53c] | 724 | <indexterm zone="openldap slapdn">
|
---|
| 725 | <primary sortas="b-slapdn">slapdn</primary>
|
---|
| 726 | </indexterm>
|
---|
| 727 | </listitem>
|
---|
| 728 | </varlistentry>
|
---|
| 729 |
|
---|
| 730 | <varlistentry id="slapindex">
|
---|
| 731 | <term><command>slapindex</command></term>
|
---|
| 732 | <listitem>
|
---|
[b5e36dd] | 733 | <para>
|
---|
| 734 | is used to regenerate slapd indexes based upon the current
|
---|
| 735 | contents of a database.
|
---|
| 736 | </para>
|
---|
[814e53c] | 737 | <indexterm zone="openldap slapindex">
|
---|
| 738 | <primary sortas="b-slapindex">slapindex</primary>
|
---|
| 739 | </indexterm>
|
---|
| 740 | </listitem>
|
---|
| 741 | </varlistentry>
|
---|
| 742 |
|
---|
| 743 | <varlistentry id="slappasswd">
|
---|
| 744 | <term><command>slappasswd</command></term>
|
---|
| 745 | <listitem>
|
---|
[b5e36dd] | 746 | <para>
|
---|
| 747 | is an <application>OpenLDAP</application> password utility.
|
---|
| 748 | </para>
|
---|
[814e53c] | 749 | <indexterm zone="openldap slappasswd">
|
---|
| 750 | <primary sortas="b-slappasswd">slappasswd</primary>
|
---|
| 751 | </indexterm>
|
---|
| 752 | </listitem>
|
---|
| 753 | </varlistentry>
|
---|
| 754 |
|
---|
[c00932a] | 755 | <varlistentry id="slapschema">
|
---|
| 756 | <term><command>slapschema</command></term>
|
---|
| 757 | <listitem>
|
---|
[b5e36dd] | 758 | <para>
|
---|
[0d7900a] | 759 | is used to check schema compliance of the contents
|
---|
[b5e36dd] | 760 | of a slapd database.
|
---|
| 761 | </para>
|
---|
[c00932a] | 762 | <indexterm zone="openldap slapschema">
|
---|
| 763 | <primary sortas="b-slapschema">slapschema</primary>
|
---|
| 764 | </indexterm>
|
---|
| 765 | </listitem>
|
---|
| 766 | </varlistentry>
|
---|
| 767 |
|
---|
[814e53c] | 768 | <varlistentry id="slaptest">
|
---|
| 769 | <term><command>slaptest</command></term>
|
---|
| 770 | <listitem>
|
---|
[b5e36dd] | 771 | <para>
|
---|
| 772 | checks the sanity of the <filename>slapd.conf</filename> file.
|
---|
| 773 | </para>
|
---|
[814e53c] | 774 | <indexterm zone="openldap slaptest">
|
---|
| 775 | <primary sortas="b-slaptest">slaptest</primary>
|
---|
| 776 | </indexterm>
|
---|
| 777 | </listitem>
|
---|
| 778 | </varlistentry>
|
---|
| 779 |
|
---|
| 780 | <varlistentry id="liblber">
|
---|
[d6da5da] | 781 | <term><filename class="libraryfile">liblber.so</filename></term>
|
---|
[814e53c] | 782 | <listitem>
|
---|
[b5e36dd] | 783 | <para>
|
---|
[1ef8da9] | 784 | is a set of Lightweight Basic Encoding Rules routines. These
|
---|
[b5e36dd] | 785 | routines are used by the LDAP library routines to encode and decode
|
---|
| 786 | LDAP protocol elements using the (slightly simplified) Basic
|
---|
| 787 | Encoding Rules defined by LDAP. They are not normally used directly
|
---|
| 788 | by an LDAP application program except in the handling of controls
|
---|
| 789 | and extended operations.
|
---|
| 790 | </para>
|
---|
[814e53c] | 791 | <indexterm zone="openldap liblber">
|
---|
[c00932a] | 792 | <primary sortas="c-liblber">liblber.so</primary>
|
---|
[814e53c] | 793 | </indexterm>
|
---|
| 794 | </listitem>
|
---|
| 795 | </varlistentry>
|
---|
| 796 |
|
---|
| 797 | <varlistentry id="libldap">
|
---|
[d6da5da] | 798 | <term><filename class="libraryfile">libldap.so</filename></term>
|
---|
[814e53c] | 799 | <listitem>
|
---|
[b5e36dd] | 800 | <para>
|
---|
| 801 | supports the LDAP programs and provide functionality for
|
---|
| 802 | other programs interacting with LDAP.
|
---|
| 803 | </para>
|
---|
[814e53c] | 804 | <indexterm zone="openldap libldap">
|
---|
[c00932a] | 805 | <primary sortas="c-libldap">libldap.so</primary>
|
---|
[814e53c] | 806 | </indexterm>
|
---|
| 807 | </listitem>
|
---|
| 808 | </varlistentry>
|
---|
| 809 |
|
---|
| 810 | <varlistentry id="libldap_r">
|
---|
[d6da5da] | 811 | <term><filename class="libraryfile">libldap_r.so</filename></term>
|
---|
[814e53c] | 812 | <listitem>
|
---|
[b5e36dd] | 813 | <para>
|
---|
| 814 | contains the functions required by the LDAP programs to
|
---|
| 815 | produce the results from LDAP requests.
|
---|
| 816 | </para>
|
---|
[814e53c] | 817 | <indexterm zone="openldap libldap_r">
|
---|
[c00932a] | 818 | <primary sortas="c-libldap_r">libldap_r.so</primary>
|
---|
[814e53c] | 819 | </indexterm>
|
---|
| 820 | </listitem>
|
---|
| 821 | </varlistentry>
|
---|
| 822 |
|
---|
| 823 | </variablelist>
|
---|
| 824 |
|
---|
| 825 | </sect2>
|
---|
[9905a3c] | 826 |
|
---|
| 827 | </sect1>
|
---|