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 |
|
---|
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">
|
---|
10 | <!ENTITY openldap-buildsize "70 MB">
|
---|
11 | <!ENTITY openldap-time "6.42 SBU">
|
---|
12 | ]>
|
---|
13 |
|
---|
14 | <sect1 id="openldap" xreflabel="OpenLDAP-&openldap-version;">
|
---|
15 | <sect1info>
|
---|
16 | <othername>$LastChangedBy$</othername>
|
---|
17 | <date>$Date$</date>
|
---|
18 | </sect1info>
|
---|
19 | <?dbhtml filename="openldap.html"?>
|
---|
20 | <title><application>Open<acronym>LDAP</acronym></application>-&openldap-version;
|
---|
21 | </title>
|
---|
22 |
|
---|
23 | <sect2>
|
---|
24 | <title>Introduction to <application>Open<acronym>LDAP</acronym></application>
|
---|
25 | </title>
|
---|
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 |
|
---|
40 | <sect3><title><application>Open<acronym>LDAP</acronym></application>
|
---|
41 | dependencies</title>
|
---|
42 | <sect4><title>Required</title>
|
---|
43 | <para><xref linkend="db"/></para>
|
---|
44 | </sect4>
|
---|
45 |
|
---|
46 | <sect4><title>Recommended</title>
|
---|
47 | <para><xref linkend="cyrus-sasl"/> and <xref linkend="openssl"/></para>
|
---|
48 | </sect4>
|
---|
49 |
|
---|
50 | <sect4><title>Optional</title>
|
---|
51 | <para><xref linkend="tcpwrappers"/>,
|
---|
52 | <xref linkend="gdbm"/>,
|
---|
53 | <ulink url="http://www.gnu.org/software/pth/">GNU Pth</ulink>, and
|
---|
54 | <xref linkend="heimdal"/> or
|
---|
55 | <xref linkend="mitkrb"/></para>
|
---|
56 | </sect4>
|
---|
57 |
|
---|
58 | </sect3>
|
---|
59 |
|
---|
60 | </sect2>
|
---|
61 |
|
---|
62 | <sect2>
|
---|
63 | <title>Installation of <application>Open<acronym>LDAP</acronym></application>
|
---|
64 | </title>
|
---|
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 \
|
---|
70 | --sysconfdir=/etc --localstatedir=/srv/ldap \
|
---|
71 | --enable-ldbm --disable-debug &&
|
---|
72 | make depend &&
|
---|
73 | make &&
|
---|
74 | make test &&
|
---|
75 | make install &&
|
---|
76 | chmod 755 /usr/lib/libl*-2.2.so.7.0.10</command></userinput></screen>
|
---|
77 |
|
---|
78 | </sect2>
|
---|
79 |
|
---|
80 | <sect2>
|
---|
81 | <title>Command explanations</title>
|
---|
82 |
|
---|
83 | <para><parameter>--libexecdir=/usr/sbin</parameter>: Installs the server
|
---|
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>
|
---|
90 |
|
---|
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>
|
---|
94 |
|
---|
95 | <para><option>--enable-ldbm</option>: Build <command>slapd</command>
|
---|
96 | with the primary database back end using either
|
---|
97 | <application>Berkeley DB</application> or
|
---|
98 | <application><acronym>GNU</acronym> Database Manager</application>.</para>
|
---|
99 |
|
---|
100 | <para><option>--disable-debug</option>: Disable debugging code.</para>
|
---|
101 |
|
---|
102 | <para><command>make test</command>: Validates the correct build of the
|
---|
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
|
---|
106 | restrictive <filename>/etc/hosts.deny</filename> file.</para>
|
---|
107 |
|
---|
108 | <para><command>chmod 755 /usr/lib/libl*-2.2.so.7.0.10</command>: This command
|
---|
109 | adds the executable bit to the shared libraries.</para>
|
---|
110 |
|
---|
111 | </sect2>
|
---|
112 |
|
---|
113 | <sect2>
|
---|
114 | <title>Configuring <application>Open<acronym>LDAP</acronym></application>
|
---|
115 | </title>
|
---|
116 |
|
---|
117 | <sect3><title>Config files</title>
|
---|
118 | <para><filename>/etc/openldap/*</filename></para>
|
---|
119 | </sect3>
|
---|
120 |
|
---|
121 | <sect3><title>Configuration Information</title>
|
---|
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>
|
---|
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>
|
---|
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>
|
---|
190 |
|
---|
191 | <screen><userinput><command>ldapsearch -x -b '' -s base '(objectclass=*)' namingContexts</command></userinput></screen>
|
---|
192 |
|
---|
193 | <para>The expected result is:</para>
|
---|
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 |
|
---|
219 | <para>The Open<acronym>LDAP</acronym> package contains
|
---|
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>,
|
---|
231 | <command>slapdn</command>,
|
---|
232 | <command>slapindex</command>,
|
---|
233 | <command>slappasswd</command>,
|
---|
234 | <command>slaptest</command>,
|
---|
235 | <command>slurpd</command>,
|
---|
236 | <filename class="libraryfile">liblber</filename> and the
|
---|
237 | <filename class="libraryfile">libldap</filename> libraries.</para>
|
---|
238 |
|
---|
239 | </sect2>
|
---|
240 |
|
---|
241 | <sect2><title>Description</title>
|
---|
242 |
|
---|
243 | <sect3><title>ldapadd</title>
|
---|
244 | <para><command>ldapadd</command> opens a connection to an
|
---|
245 | <acronym>LDAP</acronym> server, binds and adds entries.</para></sect3>
|
---|
246 |
|
---|
247 | <sect3><title>ldapcompare</title>
|
---|
248 | <para><command>ldapcompare</command> opens a connection to an
|
---|
249 | <acronym>LDAP</acronym> server, binds and performs a compare using specified
|
---|
250 | parameters.</para></sect3>
|
---|
251 |
|
---|
252 | <sect3><title>ldapdelete</title>
|
---|
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>
|
---|
256 |
|
---|
257 | <sect3><title>ldapmodify</title>
|
---|
258 | <para><command>ldapmodify</command> opens a connection to an
|
---|
259 | <acronym>LDAP</acronym> server, binds and modifies entries.</para></sect3>
|
---|
260 |
|
---|
261 | <sect3><title>ldapmodrdn</title>
|
---|
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>
|
---|
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>
|
---|
271 | <para><command>ldapsearch</command> opens a connection to an
|
---|
272 | <acronym>LDAP</acronym> server, binds and performs a search using specified
|
---|
273 | parameters.</para></sect3>
|
---|
274 |
|
---|
275 | <sect3><title>ldapwhoami</title>
|
---|
276 | <para><command>ldapwhoami</command> opens a connection to an
|
---|
277 | <acronym>LDAP</acronym> server, binds and displays whoami information.</para>
|
---|
278 | </sect3>
|
---|
279 |
|
---|
280 | <sect3><title>slapadd</title>
|
---|
281 | <para><command>slapadd</command> is used to add entries specified in
|
---|
282 | <acronym>LDAP</acronym> Directory Interchange Format (<acronym>LDIF</acronym>)
|
---|
283 | to an <acronym>LDAP</acronym> database.</para></sect3>
|
---|
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>
|
---|
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>
|
---|
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 |
|
---|
306 | <sect3><title>slaptest</title>
|
---|
307 | <para><command>slaptest</command> checks the sanity of the
|
---|
308 | <filename>slapd.conf</filename> file.</para></sect3>
|
---|
309 |
|
---|
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>
|
---|
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>
|
---|
318 |
|
---|
319 | </sect2>
|
---|
320 |
|
---|
321 | </sect1>
|
---|
322 |
|
---|