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