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