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