[0931098] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[7f76b96] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
---|
[0931098] | 3 | "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
---|
| 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[923c90dc] | 7 | <!ENTITY openldap-download-http "http://gd.tuwien.ac.at/infosys/network/OpenLDAP/openldap-release/openldap-&openldap-version;.tgz">
|
---|
| 8 | <!ENTITY openldap-download-ftp "ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-&openldap-version;.tgz">
|
---|
[03ecb3f9] | 9 | <!ENTITY openldap-md5sum "383691dbabe05ee2b72a3e9db2042a82">
|
---|
| 10 | <!ENTITY openldap-size "2.6 MB">
|
---|
[02663ce] | 11 | <!ENTITY openldap-buildsize "67 MB">
|
---|
[2c6c3b41] | 12 | <!ENTITY openldap-time "6.42 SBU">
|
---|
[0931098] | 13 | ]>
|
---|
| 14 |
|
---|
[9a9a0fec] | 15 | <sect1 id="openldap" xreflabel="OpenLDAP-&openldap-version;">
|
---|
[a0f03b0] | 16 | <sect1info>
|
---|
[5cd0959d] | 17 | <othername>$LastChangedBy$</othername>
|
---|
| 18 | <date>$Date$</date>
|
---|
[a0f03b0] | 19 | </sect1info>
|
---|
[00bb024c] | 20 | <?dbhtml filename="openldap.html"?>
|
---|
[c9ae3a5c] | 21 | <title><application>Open<acronym>LDAP</acronym></application>-&openldap-version;
|
---|
| 22 | </title>
|
---|
[9905a3c] | 23 |
|
---|
[0931098] | 24 | <sect2>
|
---|
[c9ae3a5c] | 25 | <title>Introduction to <application>Open<acronym>LDAP</acronym></application>
|
---|
| 26 | </title>
|
---|
[0931098] | 27 |
|
---|
| 28 | <para>The <application>Open<acronym>LDAP</acronym></application> package
|
---|
| 29 | provides an open source implementation of the Lightweight Directory
|
---|
| 30 | Access Protocol.</para>
|
---|
| 31 |
|
---|
| 32 | <sect3><title>Package information</title>
|
---|
| 33 | <itemizedlist spacing='compact'>
|
---|
[0fbab6b] | 34 | <listitem><para>Download (HTTP):
|
---|
| 35 | <ulink url="&openldap-download-http;"/></para></listitem>
|
---|
| 36 | <listitem><para>Download (FTP):
|
---|
| 37 | <ulink url="&openldap-download-ftp;"/></para></listitem>
|
---|
| 38 | <listitem><para>Download MD5 sum: &openldap-md5sum;</para></listitem>
|
---|
[0931098] | 39 | <listitem><para>Download size: &openldap-size;</para></listitem>
|
---|
[0fbab6b] | 40 | <listitem><para>Estimated disk space required:
|
---|
| 41 | &openldap-buildsize;</para></listitem>
|
---|
| 42 | <listitem><para>Estimated build time:
|
---|
| 43 | &openldap-time;</para></listitem></itemizedlist>
|
---|
[0931098] | 44 | </sect3>
|
---|
| 45 |
|
---|
[c9ae3a5c] | 46 | <sect3><title><application>Open<acronym>LDAP</acronym></application>
|
---|
| 47 | dependencies</title>
|
---|
[0931098] | 48 | <sect4><title>Required</title>
|
---|
[2c6c3b41] | 49 | <para><xref linkend="db"/></para>
|
---|
| 50 | </sect4>
|
---|
| 51 |
|
---|
[c9ae3a5c] | 52 | <sect4><title>Recommended</title>
|
---|
[cef3a2f] | 53 | <para><xref linkend="cyrus-sasl"/> and <xref linkend="openssl"/></para>
|
---|
[2c6c3b41] | 54 | </sect4>
|
---|
| 55 |
|
---|
[0931098] | 56 | <sect4><title>Optional</title>
|
---|
[2c6c3b41] | 57 | <para><xref linkend="tcpwrappers"/>,
|
---|
[c9ae3a5c] | 58 | <xref linkend="gdbm"/>,
|
---|
| 59 | <ulink url="http://www.gnu.org/software/pth/">GNU Pth</ulink>, and
|
---|
[0931098] | 60 | <xref linkend="heimdal"/> or
|
---|
[2c6c3b41] | 61 | <xref linkend="mitkrb"/></para>
|
---|
| 62 | </sect4>
|
---|
| 63 |
|
---|
[0931098] | 64 | </sect3>
|
---|
| 65 |
|
---|
| 66 | </sect2>
|
---|
| 67 |
|
---|
| 68 | <sect2>
|
---|
[c9ae3a5c] | 69 | <title>Installation of <application>Open<acronym>LDAP</acronym></application>
|
---|
| 70 | </title>
|
---|
[0931098] | 71 |
|
---|
| 72 | <para>Install <application>Open<acronym>LDAP</acronym></application> by
|
---|
| 73 | running the following commands:</para>
|
---|
| 74 |
|
---|
| 75 | <screen><userinput><command>./configure --prefix=/usr --libexecdir=/usr/sbin \
|
---|
[c9ae3a5c] | 76 | --sysconfdir=/etc --localstatedir=/srv/ldap \
|
---|
| 77 | --enable-ldbm --disable-debug &&
|
---|
[0931098] | 78 | make depend &&
|
---|
| 79 | make &&
|
---|
| 80 | make test &&
|
---|
[c9ae3a5c] | 81 | make install &&
|
---|
[02663ce] | 82 | chmod 755 /usr/lib/libl*-2.2.so.7.0.13</command></userinput></screen>
|
---|
[0931098] | 83 |
|
---|
| 84 | </sect2>
|
---|
| 85 |
|
---|
| 86 | <sect2>
|
---|
| 87 | <title>Command explanations</title>
|
---|
| 88 |
|
---|
[2c6c3b41] | 89 | <para><parameter>--libexecdir=/usr/sbin</parameter>: Installs the server
|
---|
[c9ae3a5c] | 90 | executables in <filename class="directory">/usr/sbin</filename> instead of
|
---|
| 91 | <filename class="directory">/usr/libexec</filename>.</para>
|
---|
| 92 |
|
---|
| 93 | <para><parameter>--sysconfdir=/etc</parameter>: Sets the configuration file
|
---|
| 94 | directory to avoid the default of
|
---|
| 95 | <filename class="directory">/usr/etc</filename>.</para>
|
---|
[0931098] | 96 |
|
---|
[c9ae3a5c] | 97 | <para><parameter>--localstatedir=/srv/ldap</parameter>: Sets the directory
|
---|
| 98 | to use for the <acronym>LDAP</acronym> directory database, replication logs and
|
---|
| 99 | run-time variable data.</para>
|
---|
[0931098] | 100 |
|
---|
[02663ce] | 101 | <para><parameter>--enable-ldbm</parameter>: Build <command>slapd</command>
|
---|
[2c6c3b41] | 102 | with the primary database back end using either
|
---|
| 103 | <application>Berkeley DB</application> or
|
---|
| 104 | <application><acronym>GNU</acronym> Database Manager</application>.</para>
|
---|
[0931098] | 105 |
|
---|
[02663ce] | 106 | <para><parameter>--disable-debug</parameter>: Disable debugging code.</para>
|
---|
[0931098] | 107 |
|
---|
[78a4071] | 108 | <para><command>make test</command>: Validates the correct build of the
|
---|
[2c6c3b41] | 109 | package. If you've enabled <application>tcp_wrappers</application>, ensure you
|
---|
| 110 | add 127.0.0.1 to the <parameter>slapd</parameter> line in the
|
---|
| 111 | <filename>/etc/hosts.allow</filename> file if you have a
|
---|
[c9ae3a5c] | 112 | restrictive <filename>/etc/hosts.deny</filename> file.</para>
|
---|
| 113 |
|
---|
[2c6c3b41] | 114 | <para><command>chmod 755 /usr/lib/libl*-2.2.so.7.0.10</command>: This command
|
---|
[c9ae3a5c] | 115 | adds the executable bit to the shared libraries.</para>
|
---|
[0931098] | 116 |
|
---|
| 117 | </sect2>
|
---|
| 118 |
|
---|
| 119 | <sect2>
|
---|
[c9ae3a5c] | 120 | <title>Configuring <application>Open<acronym>LDAP</acronym></application>
|
---|
| 121 | </title>
|
---|
[0931098] | 122 |
|
---|
| 123 | <sect3><title>Config files</title>
|
---|
| 124 | <para><filename>/etc/openldap/*</filename></para>
|
---|
| 125 | </sect3>
|
---|
| 126 |
|
---|
| 127 | <sect3><title>Configuration Information</title>
|
---|
[c9ae3a5c] | 128 | <para>Configuring the <command>slapd</command> and <command>slurpd</command>
|
---|
| 129 | servers can be complex. Securing the <acronym>LDAP</acronym> directory,
|
---|
| 130 | especially if you are storing non-public data such as password databases,
|
---|
| 131 | can also be a challenging task. You'll need to modify the
|
---|
| 132 | <filename>/etc/openldap/slapd.conf</filename> and
|
---|
| 133 | <filename>/etc/openldap/ldap.conf</filename> files to set up
|
---|
| 134 | <application>Open<acronym>LDAP</acronym></application> for your particular
|
---|
| 135 | needs.</para>
|
---|
| 136 |
|
---|
| 137 | <para>Resources to assist you with topics such as choosing a directory
|
---|
| 138 | configuration, backend and database definitions, access control settings,
|
---|
| 139 | running as a user other than root and setting a <command>chroot</command>
|
---|
| 140 | environment include:
|
---|
| 141 | </para>
|
---|
| 142 |
|
---|
| 143 | <itemizedlist spacing='compact'>
|
---|
| 144 | <listitem><para>The <command>slapd</command> man page</para></listitem>
|
---|
| 145 | <listitem><para>The <filename>slapd.conf</filename> man page</para></listitem>
|
---|
| 146 | <listitem><para>The <ulink
|
---|
| 147 | url="http://www.openldap.org/doc/admin22/">OpenLDAP 2.2 Administrator's
|
---|
| 148 | Guide</ulink></para></listitem>
|
---|
| 149 | <listitem><para>Documents located at
|
---|
| 150 | <ulink url="http://www.openldap.org/pub/"/></para></listitem>
|
---|
| 151 | </itemizedlist></sect3>
|
---|
| 152 |
|
---|
| 153 | <sect3><title>Utilizing <application>GDBM</application></title>
|
---|
| 154 | <para>To utilize <application>GDBM</application> as the database
|
---|
| 155 | backend, the <quote>database</quote> entry in
|
---|
| 156 | <filename>/etc/openldap/slapd.conf</filename> must be changed from
|
---|
| 157 | <quote>bdb</quote> to <quote>ldbm</quote>. You can use both by creating an
|
---|
| 158 | additional database section in <filename>/etc/openldap/slapd.conf</filename>.
|
---|
| 159 | </para></sect3>
|
---|
| 160 |
|
---|
| 161 | <sect3><title><application>Mozilla</application> Address Directory</title>
|
---|
| 162 | <para>By default, <acronym>LDAP</acronym>v2 support is disabled in the
|
---|
| 163 | <filename>slapd.conf</filename> file. Once the database is properly
|
---|
| 164 | set up and <application>Mozilla</application> is configured to use the
|
---|
| 165 | directory, you must add <option>allow bind_v2</option> to the
|
---|
| 166 | <filename>slapd.conf</filename> file.</para></sect3>
|
---|
| 167 |
|
---|
| 168 | <sect3><title>Init Script</title>
|
---|
| 169 | <para>To automate the startup of the <acronym>LDAP</acronym> server at system
|
---|
| 170 | bootup, install the <filename>/etc/rc.d/init.d/openldap</filename> init script
|
---|
| 171 | included in the <xref linkend="intro-important-bootscripts"/> package using the
|
---|
| 172 | following command:</para>
|
---|
| 173 |
|
---|
| 174 | <screen><userinput><command>make install-openldap1</command></userinput></screen>
|
---|
| 175 |
|
---|
| 176 | <para><emphasis>Note:</emphasis> The init script you just installed only starts
|
---|
| 177 | the <command>slapd</command> daemon. If you wish to also start the
|
---|
| 178 | <command>slurpd</command> daemon at system startup, install a modified version
|
---|
| 179 | of the script using this command:</para>
|
---|
| 180 |
|
---|
| 181 | <screen><userinput><command>make install-openldap2</command></userinput></screen>
|
---|
[5f102cb2] | 182 |
|
---|
| 183 | <note><para>The init script starts the daemons without any parameters. You'll
|
---|
| 184 | need to modify the script to include the parameters needed for your specific
|
---|
| 185 | configuration. See the <command>slapd</command> and <command>slurpd</command>
|
---|
| 186 | man pages for parameter information.</para></note>
|
---|
[c9ae3a5c] | 187 | </sect3>
|
---|
| 188 |
|
---|
| 189 | <sect3><title>Testing the Configuration</title>
|
---|
| 190 | <para>Start the <acronym>LDAP</acronym> server using the init script:</para>
|
---|
| 191 |
|
---|
| 192 | <screen><userinput><command>/etc/rc.d/init.d/openldap start</command></userinput></screen>
|
---|
| 193 |
|
---|
| 194 | <para>Verify access to the <acronym>LDAP</acronym> server with the following
|
---|
| 195 | command:</para>
|
---|
[0931098] | 196 |
|
---|
| 197 | <screen><userinput><command>ldapsearch -x -b '' -s base '(objectclass=*)' namingContexts</command></userinput></screen>
|
---|
| 198 |
|
---|
[c9ae3a5c] | 199 | <para>The expected result is:</para>
|
---|
[0931098] | 200 | <screen><computeroutput># extended LDIF
|
---|
| 201 | #
|
---|
| 202 | # LDAPv3
|
---|
| 203 | # base <> with scope base
|
---|
| 204 | # filter: (objectclass=*)
|
---|
| 205 | # requesting: namingContexts
|
---|
| 206 | #
|
---|
| 207 |
|
---|
| 208 | #
|
---|
| 209 | dn:
|
---|
| 210 | namingContexts: dc=my-domain,dc=com
|
---|
| 211 |
|
---|
| 212 | # search result
|
---|
| 213 | search: 2
|
---|
| 214 | result: 0 Success
|
---|
| 215 |
|
---|
| 216 | # numResponses: 2
|
---|
| 217 | # numEntries: 1</computeroutput></screen>
|
---|
| 218 |
|
---|
| 219 | </sect3>
|
---|
| 220 | </sect2>
|
---|
| 221 |
|
---|
| 222 | <sect2>
|
---|
| 223 | <title>Contents</title>
|
---|
| 224 |
|
---|
[c9ae3a5c] | 225 | <para>The Open<acronym>LDAP</acronym> package contains
|
---|
[0931098] | 226 | <command>ldapadd</command>,
|
---|
| 227 | <command>ldapcompare</command>,
|
---|
| 228 | <command>ldapdelete</command>,
|
---|
| 229 | <command>ldapmodify</command>,
|
---|
| 230 | <command>ldapmodrdn</command>,
|
---|
| 231 | <command>ldappasswd</command>,
|
---|
| 232 | <command>ldapsearch</command>,
|
---|
| 233 | <command>ldapwhoami</command>,
|
---|
| 234 | <command>slapadd</command>,
|
---|
| 235 | <command>slapcat</command>,
|
---|
| 236 | <command>slapd</command>,
|
---|
[c9ae3a5c] | 237 | <command>slapdn</command>,
|
---|
[0931098] | 238 | <command>slapindex</command>,
|
---|
| 239 | <command>slappasswd</command>,
|
---|
[c9ae3a5c] | 240 | <command>slaptest</command>,
|
---|
[0931098] | 241 | <command>slurpd</command>,
|
---|
[c9ae3a5c] | 242 | <filename class="libraryfile">liblber</filename> and the
|
---|
| 243 | <filename class="libraryfile">libldap</filename> libraries.</para>
|
---|
[0931098] | 244 |
|
---|
| 245 | </sect2>
|
---|
| 246 |
|
---|
| 247 | <sect2><title>Description</title>
|
---|
| 248 |
|
---|
| 249 | <sect3><title>ldapadd</title>
|
---|
[c9ae3a5c] | 250 | <para><command>ldapadd</command> opens a connection to an
|
---|
| 251 | <acronym>LDAP</acronym> server, binds and adds entries.</para></sect3>
|
---|
[0931098] | 252 |
|
---|
| 253 | <sect3><title>ldapcompare</title>
|
---|
[c9ae3a5c] | 254 | <para><command>ldapcompare</command> opens a connection to an
|
---|
| 255 | <acronym>LDAP</acronym> server, binds and performs a compare using specified
|
---|
[0931098] | 256 | parameters.</para></sect3>
|
---|
| 257 |
|
---|
| 258 | <sect3><title>ldapdelete</title>
|
---|
[c9ae3a5c] | 259 | <para><command>ldapdelete</command> opens a connection to an
|
---|
| 260 | <acronym>LDAP</acronym> server, binds and deletes one or more entries.</para>
|
---|
| 261 | </sect3>
|
---|
[0931098] | 262 |
|
---|
| 263 | <sect3><title>ldapmodify</title>
|
---|
[c9ae3a5c] | 264 | <para><command>ldapmodify</command> opens a connection to an
|
---|
| 265 | <acronym>LDAP</acronym> server, binds and modifies entries.</para></sect3>
|
---|
[0931098] | 266 |
|
---|
| 267 | <sect3><title>ldapmodrdn</title>
|
---|
[c9ae3a5c] | 268 | <para><command>ldapmodrdn</command> opens a connection to an
|
---|
| 269 | <acronym>LDAP</acronym> server, binds and modifies the
|
---|
| 270 | <acronym>RDN</acronym> of entries.</para></sect3>
|
---|
[0931098] | 271 |
|
---|
| 272 | <sect3><title>ldappasswd</title>
|
---|
| 273 | <para><command>ldappasswd</command> is a tool to set the password of an
|
---|
| 274 | <acronym>LDAP</acronym> user.</para></sect3>
|
---|
| 275 |
|
---|
| 276 | <sect3><title>ldapsearch</title>
|
---|
[c9ae3a5c] | 277 | <para><command>ldapsearch</command> opens a connection to an
|
---|
| 278 | <acronym>LDAP</acronym> server, binds and performs a search using specified
|
---|
[0931098] | 279 | parameters.</para></sect3>
|
---|
| 280 |
|
---|
| 281 | <sect3><title>ldapwhoami</title>
|
---|
[c9ae3a5c] | 282 | <para><command>ldapwhoami</command> opens a connection to an
|
---|
| 283 | <acronym>LDAP</acronym> server, binds and displays whoami information.</para>
|
---|
| 284 | </sect3>
|
---|
[0931098] | 285 |
|
---|
| 286 | <sect3><title>slapadd</title>
|
---|
| 287 | <para><command>slapadd</command> is used to add entries specified in
|
---|
[c9ae3a5c] | 288 | <acronym>LDAP</acronym> Directory Interchange Format (<acronym>LDIF</acronym>)
|
---|
| 289 | to an <acronym>LDAP</acronym> database.</para></sect3>
|
---|
[0931098] | 290 |
|
---|
| 291 | <sect3><title>slapcat</title>
|
---|
| 292 | <para><command>slapcat</command> is used to generate an <acronym>LDAP</acronym>
|
---|
| 293 | <acronym>LDIF</acronym> output
|
---|
| 294 | based upon the contents of a slapd database.</para></sect3>
|
---|
| 295 |
|
---|
| 296 | <sect3><title>slapd</title>
|
---|
[c9ae3a5c] | 297 | <para><command>slapd</command> is the stand-alone <acronym>LDAP</acronym>
|
---|
| 298 | server.</para></sect3>
|
---|
| 299 |
|
---|
| 300 | <sect3><title>slapdn</title>
|
---|
| 301 | <para><command>slapdn</command> checks a list of string-represented
|
---|
| 302 | <acronym>DN</acronym>s based on schema syntax.</para></sect3>
|
---|
[0931098] | 303 |
|
---|
| 304 | <sect3><title>slapindex</title>
|
---|
| 305 | <para><command>slapindex</command> is used to regenerate slapd
|
---|
| 306 | indices based upon the current contents of a database.</para></sect3>
|
---|
| 307 |
|
---|
| 308 | <sect3><title>slappasswd</title>
|
---|
| 309 | <para><command>slappasswd</command> is an Open<acronym>LDAP</acronym> password
|
---|
| 310 | utility.</para></sect3>
|
---|
| 311 |
|
---|
[c9ae3a5c] | 312 | <sect3><title>slaptest</title>
|
---|
| 313 | <para><command>slaptest</command> checks the sanity of the
|
---|
| 314 | <filename>slapd.conf</filename> file.</para></sect3>
|
---|
| 315 |
|
---|
[0931098] | 316 | <sect3><title>slurpd</title>
|
---|
| 317 | <para><command>slurpd</command> is the stand-alone
|
---|
| 318 | <acronym>LDAP</acronym> replication server.</para></sect3>
|
---|
| 319 |
|
---|
| 320 | <sect3><title>liblber and libldap</title>
|
---|
[c9ae3a5c] | 321 | <para>These libraries support the <acronym>LDAP</acronym> programs and provide
|
---|
| 322 | functionality for other programs interacting with <acronym>LDAP</acronym>.
|
---|
| 323 | </para></sect3>
|
---|
[0931098] | 324 |
|
---|
| 325 | </sect2>
|
---|
[9905a3c] | 326 |
|
---|
| 327 | </sect1>
|
---|