source: server/other/openldap.xml@ 5f102cb2

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.0 6.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 6.3 6.3-rc1 6.3-rc2 6.3-rc3 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 5f102cb2 was 5f102cb2, checked in by Randy McMurchy <randy@…>, 20 years ago

Added init script note to OpenLDAP instructions

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@2572 af4574ff-66df-0310-9fd7-8a98e5e911e0

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