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