Sophie

Sophie

distrib > Mageia > 6 > x86_64 > by-pkgid > 5330f0f249709b08f87787dd0f138ea5 > files > 156

openldap-doc-2.4.45-2.1.mga6.x86_64.rpm

<!doctype html public "-//W30//DTD W3 HTML 2.0//EN">

<HTML>

<!-- This file was generated using SDF 2.001 by
     Ian Clatworthy (ianc@mincom.com). SDF is freely
     available from http://www.mincom.com/mtr/sdf. -->

<HEAD>
<TITLE>OpenLDAP Software 2.4 Administrator's Guide: The slapd Configuration File</TITLE>
</HEAD>
<BODY>

<DIV CLASS="header">
<A HREF="http://www.OpenLDAP.org/">
<P><IMG SRC="../images/LDAPlogo.gif" ALIGN="Left" BORDER=0></P>
</A>
<DIV CLASS="navigate">
<P ALIGN="Center"><A HREF="index.html">Contents</A> | <A HREF="index.html">Parent Topic</A> | <A HREF="slapdconf2.html">Previous Topic</A> | <A HREF="runningslapd.html">Next Topic</A> <BR><A HREF="http://www.openldap.org/">Home</A> | <A HREF="../index.html">Catalog</A></P>
</DIV>
<BR CLEAR="Left">
</DIV>
<DIV CLASS="main">
<H1>6. The slapd Configuration File</H1>
<P>This chapter describes configuring <EM>slapd</EM>(8) via the <EM>slapd.conf</EM>(5) configuration file.  <EM>slapd.conf</EM>(5) has been deprecated and should only be used if your site requires one of the backends that hasn't yet been updated to work with the newer <EM>slapd-config</EM>(5) system.  Configuring <EM>slapd</EM>(8) via <EM>slapd-config</EM>(5) is described in the previous chapter.</P>
<P>The <EM>slapd.conf</EM>(5) file is normally installed in the <TT>/usr/local/etc/openldap</TT> directory.  An alternate configuration file location can be specified via a command-line option to <EM>slapd</EM>(8).</P>
<HR>
<H2><A NAME="Configuration File Format">6.1. Configuration File Format</A></H2>
<P>The <EM>slapd.conf</EM>(5) file consists of three types of configuration information: global, backend specific, and database specific.  Global information is specified first, followed by information associated with a particular backend type, which is then followed by information associated with a particular database instance.  Global directives can be overridden in backend and/or database directives, and backend directives can be overridden by database directives.</P>
<P>Blank lines and comment lines beginning with a '<TT>#</TT>' character are ignored.  If a line begins with whitespace, it is considered a continuation of the previous line (even if the previous line is a comment).</P>
<P>The general format of slapd.conf is as follows:</P>
<PRE>
        # global configuration directives
        &lt;global config directives&gt;

        # backend definition
        backend &lt;typeA&gt;
        &lt;backend-specific directives&gt;

        # first database definition &amp; config directives
        database &lt;typeA&gt;
        &lt;database-specific directives&gt;

        # second database definition &amp; config directives
        database &lt;typeB&gt;
        &lt;database-specific directives&gt;

        # second database definition &amp; config directives
        database &lt;typeA&gt;
        &lt;database-specific directives&gt;

        # subsequent backend &amp; database definitions &amp; config directives
        ...
</PRE>
<P>A configuration directive may take arguments.  If so, they are separated by whitespace.  If an argument contains whitespace, the argument should be enclosed in double quotes <TT>&quot;like this&quot;</TT>. If an argument contains a double quote or a backslash character `<TT>\</TT>', the character should be preceded by a backslash character `<TT>\</TT>'.</P>
<P>The distribution contains an example configuration file that will be installed in the <TT>/usr/local/etc/openldap</TT> directory. A number of files containing schema definitions (attribute types and object classes) are also provided in the <TT>/usr/local/etc/openldap/schema</TT> directory.</P>
<HR>
<H2><A NAME="Configuration File Directives">6.2. Configuration File Directives</A></H2>
<P>This section details commonly used configuration directives.  For a complete list, see the <EM>slapd.conf</EM>(5) manual page.  This section separates the configuration file directives into global, backend-specific and data-specific categories, describing each directive and its default value (if any), and giving an example of its use.</P>
<H3><A NAME="Global Directives">6.2.1. Global Directives</A></H3>
<P>Directives described in this section apply to all backends and databases unless specifically overridden in a backend or database definition.  Arguments that should be replaced by actual text are shown in brackets <TT>&lt;&gt;</TT>.</P>
<H4><A NAME="access to &lt;what&gt; [ by &lt;who&gt; [&lt;accesslevel&gt;] [&lt;control&gt;] ]+">6.2.1.1. access to &lt;what&gt; [ by &lt;who&gt; [&lt;accesslevel&gt;] [&lt;control&gt;] ]+</A></H4>
<P>This directive grants access (specified by &lt;accesslevel&gt;) to a set of entries and/or attributes (specified by &lt;what&gt;) by one or more requestors (specified by &lt;who&gt;).  See the <A HREF="access-control.html">Access Control</A> section of this guide for basic usage.</P>
<P><HR WIDTH="80%" ALIGN="Left">
<STRONG>Note: </STRONG>If no <TT>access</TT> directives are specified, the default access control policy, <TT>access to * by * read</TT>, allows all both authenticated and anonymous users read access.
<HR WIDTH="80%" ALIGN="Left"></P>
<H4><A NAME="attributetype &lt;{{REF:RFC4512}} Attribute Type Description&gt;"> </A>6.2.1.2. attributetype &lt;<A HREF="http://www.rfc-editor.org/rfc/rfc4512.txt">RFC4512</A> Attribute Type Description&gt;</H4>
<P>This directive defines an attribute type. Please see the <A HREF="schema.html">Schema Specification</A> chapter for information regarding how to use this directive.</P>
<H4><A NAME="idletimeout &lt;integer&gt;">6.2.1.3. idletimeout &lt;integer&gt;</A></H4>
<P>Specify the number of seconds to wait before forcibly closing an idle client connection.  An idletimeout of 0, the default, disables this feature.</P>
<H4><A NAME="include &lt;filename&gt;">6.2.1.4. include &lt;filename&gt;</A></H4>
<P>This directive specifies that slapd should read additional configuration information from the given file before continuing with the next line of the current file. The included file should follow the normal slapd config file format.  The file is commonly used to include files containing schema specifications.</P>
<P><HR WIDTH="80%" ALIGN="Left">
<STRONG>Note: </STRONG>You should be careful when using this directive - there is no small limit on the number of nested include directives, and no loop detection is done.
<HR WIDTH="80%" ALIGN="Left"></P>
<H4><A NAME="loglevel &lt;level&gt;">6.2.1.5. loglevel &lt;level&gt;</A></H4>
<P>This directive specifies the level at which debugging statements and operation statistics should be syslogged (currently logged to the <EM>syslogd</EM>(8) <TT>LOG_LOCAL4</TT> facility). You must have configured OpenLDAP <TT>--enable-debug</TT> (the default) for this to work (except for the two statistics levels, which are always enabled). Log levels may be specified as integers or by keyword. Multiple log levels may be used and the levels are additive. To display what numbers correspond to what kind of debugging, invoke slapd with <TT>-d?</TT> or consult the table below. The possible values for &lt;integer&gt; are:</P>
<TABLE CLASS="columns" BORDER ALIGN='Center'>
<CAPTION ALIGN=top>Table 6.1: Debugging Levels</CAPTION>
<TR CLASS="heading">
<TD ALIGN='Right'>
<STRONG>Level</STRONG>
</TD>
<TD ALIGN='Left'>
<STRONG>Keyword</STRONG>
</TD>
<TD>
<STRONG>Description</STRONG>
</TD>
</TR>
<TR>
<TD ALIGN='Right'>
-1
</TD>
<TD ALIGN='Left'>
any
</TD>
<TD>
enable all debugging
</TD>
</TR>
<TR>
<TD ALIGN='Right'>
0
</TD>
<TD ALIGN='Left'>
&nbsp;
</TD>
<TD>
no debugging
</TD>
</TR>
<TR>
<TD ALIGN='Right'>
1
</TD>
<TD ALIGN='Left'>
(0x1 trace)
</TD>
<TD>
trace function calls
</TD>
</TR>
<TR>
<TD ALIGN='Right'>
2
</TD>
<TD ALIGN='Left'>
(0x2 packets)
</TD>
<TD>
debug packet handling
</TD>
</TR>
<TR>
<TD ALIGN='Right'>
4
</TD>
<TD ALIGN='Left'>
(0x4 args)
</TD>
<TD>
heavy trace debugging
</TD>
</TR>
<TR>
<TD ALIGN='Right'>
8
</TD>
<TD ALIGN='Left'>
(0x8 conns)
</TD>
<TD>
connection management
</TD>
</TR>
<TR>
<TD ALIGN='Right'>
16
</TD>
<TD ALIGN='Left'>
(0x10 BER)
</TD>
<TD>
print out packets sent and received
</TD>
</TR>
<TR>
<TD ALIGN='Right'>
32
</TD>
<TD ALIGN='Left'>
(0x20 filter)
</TD>
<TD>
search filter processing
</TD>
</TR>
<TR>
<TD ALIGN='Right'>
64
</TD>
<TD ALIGN='Left'>
(0x40 config)
</TD>
<TD>
configuration processing
</TD>
</TR>
<TR>
<TD ALIGN='Right'>
128
</TD>
<TD ALIGN='Left'>
(0x80 ACL)
</TD>
<TD>
access control list processing
</TD>
</TR>
<TR>
<TD ALIGN='Right'>
256
</TD>
<TD ALIGN='Left'>
(0x100 stats)
</TD>
<TD>
stats log connections/operations/results
</TD>
</TR>
<TR>
<TD ALIGN='Right'>
512
</TD>
<TD ALIGN='Left'>
(0x200 stats2)
</TD>
<TD>
stats log entries sent
</TD>
</TR>
<TR>
<TD ALIGN='Right'>
1024
</TD>
<TD ALIGN='Left'>
(0x400 shell)
</TD>
<TD>
print communication with shell backends
</TD>
</TR>
<TR>
<TD ALIGN='Right'>
2048
</TD>
<TD ALIGN='Left'>
(0x800 parse)
</TD>
<TD>
print entry parsing debugging
</TD>
</TR>
<TR>
<TD ALIGN='Right'>
16384
</TD>
<TD ALIGN='Left'>
(0x4000 sync)
</TD>
<TD>
syncrepl consumer processing
</TD>
</TR>
<TR>
<TD ALIGN='Right'>
32768
</TD>
<TD ALIGN='Left'>
(0x8000 none)
</TD>
<TD>
only messages that get logged whatever log level is set
</TD>
</TR>
</TABLE>

<P>The desired log level can be input as a single integer that combines the (ORed) desired levels, both in decimal or in hexadecimal notation, as a list of integers (that are ORed internally), or as a list of the names that are shown between brackets, such that</P>
<PRE>
                loglevel 129
                loglevel 0x81
                loglevel 128 1
                loglevel 0x80 0x1
                loglevel acl trace
</PRE>
<P>are equivalent.</P>
<P>Examples:</P>
<PRE>
 loglevel -1
</PRE>
<P>This will cause lots and lots of debugging information to be logged.</P>
<PRE>
 loglevel conns filter
</PRE>
<P>Just log the connection and search filter processing.</P>
<PRE>
 loglevel none
</PRE>
<P>Log those messages that are logged regardless of the configured loglevel. This differs from setting the log level to 0, when no logging occurs. At least the <TT>None</TT> level is required to have high priority messages logged.</P>
<P>Default:</P>
<PRE>
 loglevel stats
</PRE>
<P>Basic stats logging is configured by default. However, if no loglevel is defined, no logging occurs (equivalent to a 0 level).</P>
<H4><A NAME="objectclass &lt;{{REF:RFC4512}} Object Class Description&gt;"> </A>6.2.1.6. objectclass &lt;<A HREF="http://www.rfc-editor.org/rfc/rfc4512.txt">RFC4512</A> Object Class Description&gt;</H4>
<P>This directive defines an object class. Please see the <A HREF="schema.html">Schema Specification</A> chapter for information regarding how to use this directive.</P>
<H4><A NAME="referral &lt;URI&gt;">6.2.1.7. referral &lt;URI&gt;</A></H4>
<P>This directive specifies the referral to pass back when slapd cannot find a local database to handle a request.</P>
<P>Example:</P>
<PRE>
        referral ldap://root.openldap.org
</PRE>
<P>This will refer non-local queries to the global root LDAP server at the OpenLDAP Project. Smart LDAP clients can re-ask their query at that server, but note that most of these clients are only going to know how to handle simple LDAP URLs that contain a host part and optionally a distinguished name part.</P>
<H4><A NAME="sizelimit &lt;integer&gt;">6.2.1.8. sizelimit &lt;integer&gt;</A></H4>
<P>This directive specifies the maximum number of entries to return from a search operation.</P>
<P>Default:</P>
<PRE>
        sizelimit 500
</PRE>
<P>See the <A HREF="limits.html">Limits</A> section of this guide and <EM>slapd.conf</EM>(5) for more details.</P>
<H4><A NAME="timelimit &lt;integer&gt;">6.2.1.9. timelimit &lt;integer&gt;</A></H4>
<P>This directive specifies the maximum number of seconds (in real time) slapd will spend answering a search request. If a request is not finished in this time, a result indicating an exceeded timelimit will be returned.</P>
<P>Default:</P>
<PRE>
        timelimit 3600
</PRE>
<P>See the <A HREF="limits.html">Limits</A> section of this guide and <EM>slapd.conf</EM>(5) for more details.</P>
<H3><A NAME="General Backend Directives">6.2.2. General Backend Directives</A></H3>
<P>Directives in this section apply only to the backend in which they are defined. They are supported by every type of backend. Backend directives apply to all databases instances of the same type and, depending on the directive, may be overridden by database directives.</P>
<H4><A NAME="backend &lt;type&gt;">6.2.2.1. backend &lt;type&gt;</A></H4>
<P>This directive marks the beginning of a backend declaration. <TT>&lt;type&gt;</TT> should be one of the supported backend types listed in Table 6.2.</P>
<TABLE CLASS="columns" BORDER ALIGN='Center'>
<CAPTION ALIGN=top>Table 6.2: Database Backends</CAPTION>
<TR CLASS="heading">
<TD>
<STRONG>Types</STRONG>
</TD>
<TD>
<STRONG>Description</STRONG>
</TD>
</TR>
<TR>
<TD>
<TT>bdb</TT>
</TD>
<TD>
Berkeley DB transactional backend (deprecated)
</TD>
</TR>
<TR>
<TD>
<TT>dnssrv</TT>
</TD>
<TD>
DNS SRV backend
</TD>
</TR>
<TR>
<TD>
<TT>hdb</TT>
</TD>
<TD>
Hierarchical variant of bdb backend (deprecated)
</TD>
</TR>
<TR>
<TD>
<TT>ldap</TT>
</TD>
<TD>
Lightweight Directory Access Protocol (Proxy) backend
</TD>
</TR>
<TR>
<TD>
<TT>mdb</TT>
</TD>
<TD>
Memory-Mapped DB backend
</TD>
</TR>
<TR>
<TD>
<TT>meta</TT>
</TD>
<TD>
Meta Directory backend
</TD>
</TR>
<TR>
<TD>
<TT>monitor</TT>
</TD>
<TD>
Monitor backend
</TD>
</TR>
<TR>
<TD>
<TT>passwd</TT>
</TD>
<TD>
Provides read-only access to <EM>passwd</EM>(5)
</TD>
</TR>
<TR>
<TD>
<TT>perl</TT>
</TD>
<TD>
Perl Programmable backend
</TD>
</TR>
<TR>
<TD>
<TT>shell</TT>
</TD>
<TD>
Shell (extern program) backend
</TD>
</TR>
<TR>
<TD>
<TT>sql</TT>
</TD>
<TD>
SQL Programmable backend
</TD>
</TR>
</TABLE>

<P>Example:</P>
<PRE>
        backend bdb
</PRE>
<P>This marks the beginning of a new <TERM>BDB</TERM> backend definition.</P>
<H3><A NAME="General Database Directives">6.2.3. General Database Directives</A></H3>
<P>Directives in this section apply only to the database in which they are defined. They are supported by every type of database.</P>
<H4><A NAME="database &lt;type&gt;">6.2.3.1. database &lt;type&gt;</A></H4>
<P>This directive marks the beginning of a database instance declaration. <TT>&lt;type&gt;</TT> should be one of the supported backend types listed in Table 6.2.</P>
<P>Example:</P>
<PRE>
        database bdb
</PRE>
<P>This marks the beginning of a new <TERM>BDB</TERM> database instance declaration.</P>
<H4><A NAME="limits &lt;selector&gt; &lt;limit&gt; [&lt;limit&gt; [...]]">6.2.3.2. limits &lt;selector&gt; &lt;limit&gt; [&lt;limit&gt; [...]]</A></H4>
<P>Specify time and size limits based on the operation's initiator or base DN.</P>
<P>See the <A HREF="limits.html">Limits</A> section of this guide and <EM>slapd.conf</EM>(5) for more details.</P>
<H4><A NAME="readonly { on | off }">6.2.3.3. readonly { on | off }</A></H4>
<P>This directive puts the database into &quot;read-only&quot; mode. Any attempts to modify the database will return an &quot;unwilling to perform&quot; error.  If set on a consumer, modifications sent by syncrepl will still occur.</P>
<P>Default:</P>
<PRE>
        readonly off
</PRE>
<H4><A NAME="rootdn &lt;DN&gt;">6.2.3.4. rootdn &lt;DN&gt;</A></H4>
<P>This directive specifies the DN that is not subject to access control or administrative limit restrictions for operations on this database.  The DN need not refer to an entry in this database or even in the directory. The DN may refer to a SASL identity.</P>
<P>Entry-based Example:</P>
<PRE>
        rootdn &quot;cn=Manager,dc=example,dc=com&quot;
</PRE>
<P>SASL-based Example:</P>
<PRE>
        rootdn &quot;uid=root,cn=example.com,cn=digest-md5,cn=auth&quot;
</PRE>
<P>See the <A HREF="sasl.html#SASL Authentication">SASL Authentication</A> section for information on SASL authentication identities.</P>
<H4><A NAME="rootpw &lt;password&gt;">6.2.3.5. rootpw &lt;password&gt;</A></H4>
<P>This directive can be used to specifies a password for the DN for the rootdn (when the rootdn is set to a DN within the database).</P>
<P>Example:</P>
<PRE>
        rootpw secret
</PRE>
<P>It is also permissible to provide hash of the password in <A HREF="http://www.rfc-editor.org/rfc/rfc2307.txt">RFC2307</A> form.  <EM>slappasswd</EM>(8) may be used to generate the password hash.</P>
<P>Example:</P>
<PRE>
        rootpw {SSHA}ZKKuqbEKJfKSXhUbHG3fG8MDn9j1v4QN
</PRE>
<P>The hash was generated using the command <TT>slappasswd -s secret</TT>.</P>
<H4><A NAME="suffix &lt;dn suffix&gt;">6.2.3.6. suffix &lt;dn suffix&gt;</A></H4>
<P>This directive specifies the DN suffix of queries that will be passed to this backend database. Multiple suffix lines can be given, and at least one is required for each database definition.</P>
<P>Example:</P>
<PRE>
        suffix &quot;dc=example,dc=com&quot;
</PRE>
<P>Queries with a DN ending in &quot;dc=example,dc=com&quot; will be passed to this backend.</P>
<P><HR WIDTH="80%" ALIGN="Left">
<STRONG>Note: </STRONG>When the backend to pass a query to is selected, slapd looks at the suffix line(s) in each database definition in the order they appear in the file. Thus, if one database suffix is a prefix of another, it must appear after it in the config file.
<HR WIDTH="80%" ALIGN="Left"></P>
<H4><A NAME="syncrepl">6.2.3.7. syncrepl</A></H4>
<PRE>
        syncrepl rid=&lt;replica ID&gt;
                provider=ldap[s]://&lt;hostname&gt;[:port]
                searchbase=&lt;base DN&gt;
                [type=refreshOnly|refreshAndPersist]
                [interval=dd:hh:mm:ss]
                [retry=[&lt;retry interval&gt; &lt;# of retries&gt;]+]
                [filter=&lt;filter str&gt;]
                [scope=sub|one|base]
                [attrs=&lt;attr list&gt;]
                [exattrs=&lt;attr list&gt;]
                [attrsonly]
                [sizelimit=&lt;limit&gt;]
                [timelimit=&lt;limit&gt;]
                [schemachecking=on|off]
                [network-timeout=&lt;seconds&gt;]
                [timeout=&lt;seconds&gt;]
                [bindmethod=simple|sasl]
                [binddn=&lt;DN&gt;]
                [saslmech=&lt;mech&gt;]
                [authcid=&lt;identity&gt;]
                [authzid=&lt;identity&gt;]
                [credentials=&lt;passwd&gt;]
                [realm=&lt;realm&gt;]
                [secprops=&lt;properties&gt;]
                [keepalive=&lt;idle&gt;:&lt;probes&gt;:&lt;interval&gt;]
                [starttls=yes|critical]
                [tls_cert=&lt;file&gt;]
                [tls_key=&lt;file&gt;]
                [tls_cacert=&lt;file&gt;]
                [tls_cacertdir=&lt;path&gt;]
                [tls_reqcert=never|allow|try|demand]
                [tls_cipher_suite=&lt;ciphers&gt;]
                [tls_crlcheck=none|peer|all]
                [tls_protocol_min=&lt;major&gt;[.&lt;minor&gt;]]
                [suffixmassage=&lt;real DN&gt;]
                [logbase=&lt;base DN&gt;]
                [logfilter=&lt;filter str&gt;]
                [syncdata=default|accesslog|changelog]
</PRE>
<P>This directive specifies the current database as a replica of the master content by establishing the current <EM>slapd</EM>(8) as a replication consumer site running a syncrepl replication engine. The master database is located at the replication provider site specified by the <TT>provider</TT> parameter. The replica database is kept up-to-date with the master content using the LDAP Content Synchronization protocol. See <A HREF="http://www.rfc-editor.org/rfc/rfc4533.txt">RFC4533</A> for more information on the protocol.</P>
<P>The <TT>rid</TT> parameter is used for identification of the current <TT>syncrepl</TT> directive within the replication consumer server, where <TT>&lt;replica ID&gt;</TT> uniquely identifies the syncrepl specification described by the current <TT>syncrepl</TT> directive. <TT>&lt;replica ID&gt;</TT> is non-negative and is no more than three decimal digits in length.</P>
<P>The <TT>provider</TT> parameter specifies the replication provider site containing the master content as an LDAP URI. The <TT>provider</TT> parameter specifies a scheme, a host and optionally a port where the provider slapd instance can be found. Either a domain name or IP address may be used for &lt;hostname&gt;. Examples are <TT>ldap://provider.example.com:389</TT> or <TT>ldaps://192.168.1.1:636</TT>. If &lt;port&gt; is not given, the standard LDAP port number (389 or 636) is used. Note that the syncrepl uses a consumer-initiated protocol, and hence its specification is located at the consumer site, whereas the <TT>replica</TT> specification is located at the provider site. <TT>syncrepl</TT> and <TT>replica</TT> directives define two independent replication mechanisms. They do not represent the replication peers of each other.</P>
<P>The content of the syncrepl replica is defined using a search specification as its result set. The consumer slapd will send search requests to the provider slapd according to the search specification. The search specification includes <TT>searchbase</TT>, <TT>scope</TT>, <TT>filter</TT>, <TT>attrs</TT>, <TT>exattrs</TT>, <TT>attrsonly</TT>, <TT>sizelimit</TT>, and <TT>timelimit</TT> parameters as in the normal search specification. The <TT>searchbase</TT> parameter has no default value and must always be specified. The <TT>scope</TT> defaults to <TT>sub</TT>, the <TT>filter</TT> defaults to <TT>(objectclass=*)</TT>, <TT>attrs</TT> defaults to <TT>&quot;*,+&quot;</TT> to replicate all user and operational attributes, and <TT>attrsonly</TT> is unset by default. Both <TT>sizelimit</TT> and <TT>timelimit</TT> default to &quot;unlimited&quot;, and only positive integers or &quot;unlimited&quot; may be specified. The <TT>exattrs</TT> option may also be used to specify attributes that should be omitted from incoming entries.</P>
<P>The <TERM>LDAP Content Synchronization</TERM> protocol has two operation types: <TT>refreshOnly</TT> and <TT>refreshAndPersist</TT>. The operation type is specified by the <TT>type</TT> parameter. In the <TT>refreshOnly</TT> operation, the next synchronization search operation is periodically rescheduled at an interval time after each synchronization operation finishes. The interval is specified by the <TT>interval</TT> parameter. It is set to one day by default. In the <TT>refreshAndPersist</TT> operation, a synchronization search remains persistent in the provider <EM>slapd</EM> instance. Further updates to the master replica will generate <TT>searchResultEntry</TT> to the consumer slapd as the search responses to the persistent synchronization search.</P>
<P>If an error occurs during replication, the consumer will attempt to reconnect according to the retry parameter which is a list of the &lt;retry interval&gt; and &lt;# of retries&gt; pairs. For example, retry=&quot;60 10 300 3&quot; lets the consumer retry every 60 seconds for the first 10 times and then retry every 300 seconds for the next three times before stop retrying. + in &lt;#  of retries&gt; means indefinite number of retries until success.</P>
<P>The schema checking can be enforced at the LDAP Sync consumer site by turning on the <TT>schemachecking</TT> parameter. If it is turned on, every replicated entry will be checked for its schema as the entry is stored into the replica content. Every entry in the replica should contain those attributes required by the schema definition. If it is turned off, entries will be stored without checking schema conformance. The default is off.</P>
<P>The <TT>network-timeout</TT> parameter sets how long the consumer will wait to establish a network connection to the provider.  Once a connection is established, the <TT>timeout</TT> parameter determines how long the consumer will wait for the initial Bind request to complete.  The defaults for these parameters come from <EM>ldap.conf</EM>(5).</P>
<P>The <TT>binddn</TT> parameter gives the DN to bind as for the syncrepl searches to the provider slapd. It should be a DN which has read access to the replication content in the master database.</P>
<P>The <TT>bindmethod</TT> is <TT>simple</TT> or <TT>sasl</TT>, depending on whether simple password-based authentication or <TERM>SASL</TERM> authentication is to be used when connecting to the provider <EM>slapd</EM> instance.</P>
<P>Simple authentication should not be used unless adequate data integrity and confidentiality protections are in place (e.g. TLS or IPsec). Simple authentication requires specification of <TT>binddn</TT> and <TT>credentials</TT> parameters.</P>
<P>SASL authentication is generally recommended.  SASL authentication requires specification of a mechanism using the <TT>saslmech</TT> parameter. Depending on the mechanism, an authentication identity and/or credentials can be specified using <TT>authcid</TT> and <TT>credentials</TT>, respectively.  The <TT>authzid</TT> parameter may be used to specify an authorization identity.</P>
<P>The <TT>realm</TT> parameter specifies a realm which a certain mechanisms authenticate the identity within. The <TT>secprops</TT> parameter specifies Cyrus SASL security properties.</P>
<P>The <TT>keepalive</TT> parameter sets the values of idle, probes, and interval used to check whether a socket is alive;  idle is the number of seconds a connection needs to remain idle before TCP starts sending keepalive probes; probes is the maximum number of keepalive probes TCP should send before dropping the connection; interval is interval in seconds between individual keepalive probes.  Only some systems support the customization of these values; the keepalive parameter is ignored otherwise, and system-wide settings are used. For example, keepalive=&quot;240:10:30&quot; will send a keepalive probe 10 times, every 30 seconds, after 240 seconds of idle activity.  If no response to the probes is received, the connection will be dropped.</P>
<P>The <TT>starttls</TT> parameter specifies use of the StartTLS extended operation to establish a TLS session before authenticating to the provider. If the <TT>critical</TT> argument is supplied, the session will be aborted if the StartTLS request fails.  Otherwise the syncrepl session continues without TLS.  The tls_reqcert setting defaults to <TT>&quot;demand&quot;</TT> and the other TLS settings default to the same as the main slapd TLS settings.</P>
<P>The <TT>suffixmassage</TT> parameter allows the consumer to pull entries from a remote directory whose DN suffix differs from the local directory. The portion of the remote entries' DNs that matches the searchbase will be replaced with the suffixmassage DN.</P>
<P>Rather than replicating whole entries, the consumer can query logs of data modifications.  This mode of operation is referred to as <EM>delta syncrepl</EM>.  In addition to the above parameters, the <TT>logbase</TT> and <TT>logfilter</TT> parameters must be set appropriately for the log that will be used. The <TT>syncdata</TT> parameter must be set to either <TT>&quot;accesslog&quot;</TT> if the log conforms to the <EM>slapo-accesslog</EM>(5) log format, or <TT>&quot;changelog&quot;</TT> if the log conforms to the obsolete <EM>changelog</EM> format. If the <TT>syncdata</TT> parameter is omitted or set to <TT>&quot;default&quot;</TT> then the log parameters are ignored.</P>
<P>The <EM>syncrepl</EM> replication mechanism is supported by the <EM>bdb</EM>, <EM>hdb</EM>, and <EM>mdb</EM> backends.</P>
<P>See the <A HREF="replication.html#LDAP Sync Replication">LDAP Sync Replication</A> chapter of this guide for more information on how to use this directive.</P>
<H4><A NAME="updateref &lt;URL&gt;">6.2.3.8. updateref &lt;URL&gt;</A></H4>
<P>This directive is only applicable in a <EM>slave</EM> (or <EM>shadow</EM>) <EM>slapd</EM>(8) instance. It specifies the URL to return to clients which submit update requests upon the replica. If specified multiple times, each <TERM>URL</TERM> is provided.</P>
<P>Example:</P>
<PRE>
        updateref       ldap://master.example.net
</PRE>
<H3><A NAME="BDB and HDB Database Directives">6.2.4. BDB and HDB Database Directives</A></H3>
<P>Directives in this category only apply to both the <TERM>BDB</TERM> and the <TERM>HDB</TERM> database. That is, they must follow a &quot;database bdb&quot; or &quot;database hdb&quot; line and come before any subsequent &quot;backend&quot; or &quot;database&quot; line.  For a complete reference of BDB/HDB configuration directives, see <EM>slapd-bdb</EM>(5).</P>
<H4><A NAME="directory &lt;directory&gt;">6.2.4.1. directory &lt;directory&gt;</A></H4>
<P>This directive specifies the directory where the BDB files containing the database and associated indices live.</P>
<P>Default:</P>
<PRE>
        directory /usr/local/var/openldap-data
</PRE>
<HR>
<H2><A NAME="Configuration File Example">6.3. Configuration File Example</A></H2>
<P>The following is an example configuration file, interspersed with explanatory text. It defines two databases to handle different parts of the <TERM>X.500</TERM> tree; both are <TERM>BDB</TERM> database instances. The line numbers shown are provided for reference only and are not included in the actual file. First, the global configuration section:</P>
<PRE>
  1.    # example config file - global configuration section
  2.    include /usr/local/etc/schema/core.schema
  3.    referral ldap://root.openldap.org
  4.    access to * by * read
</PRE>
<P>Line 1 is a comment. Line 2 includes another config file which contains <EM>core</EM> schema definitions. The <TT>referral</TT> directive on line 3 means that queries not local to one of the databases defined below will be referred to the LDAP server running on the standard port (389) at the host <TT>root.openldap.org</TT>.</P>
<P>Line 4 is a global access control.  It applies to all entries (after any applicable database-specific access controls).</P>
<P>The next section of the configuration file defines a BDB backend that will handle queries for things in the &quot;dc=example,dc=com&quot; portion of the tree. The database is to be replicated to two slave slapds, one on truelies, the other on judgmentday. Indices are to be maintained for several attributes, and the <TT>userPassword</TT> attribute is to be protected from unauthorized access.</P>
<PRE>
  5.    # BDB definition for the example.com
  6.    database bdb
  7.    suffix &quot;dc=example,dc=com&quot;
  8.    directory /usr/local/var/openldap-data
  9.    rootdn &quot;cn=Manager,dc=example,dc=com&quot;
 10.    rootpw secret
 11.    # indexed attribute definitions
 12.    index uid pres,eq
 13.    index cn,sn pres,eq,approx,sub
 14.    index objectClass eq
 15.    # database access control definitions
 16.    access to attrs=userPassword
 17.        by self write
 18.        by anonymous auth
 19.        by dn.base=&quot;cn=Admin,dc=example,dc=com&quot; write
 20.        by * none
 21.    access to *
 22.        by self write
 23.        by dn.base=&quot;cn=Admin,dc=example,dc=com&quot; write
 24.        by * read
</PRE>
<P>Line 5 is a comment. The start of the database definition is marked by the database keyword on line 6. Line 7 specifies the DN suffix for queries to pass to this database. Line 8 specifies the directory in which the database files will live.</P>
<P>Lines 9 and 10 identify the database <EM>super-user</EM> entry and associated password. This entry is not subject to access control or size or time limit restrictions.</P>
<P>Lines 12 through 14 indicate the indices to maintain for various attributes.</P>
<P>Lines 16 through 24 specify access control for entries in this database. For all applicable entries, the <TT>userPassword</TT> attribute is writable by the entry itself and by the &quot;admin&quot; entry.  It may be used for authentication/authorization purposes, but is otherwise not readable. All other attributes are writable by the entry and the &quot;admin&quot; entry, but may be read by all users (authenticated or not).</P>
<P>The next section of the example configuration file defines another BDB database. This one handles queries involving the <TT>dc=example,dc=net</TT> subtree but is managed by the same entity as the first database.  Note that without line 39, the read access would be allowed due to the global access rule at line 4.</P>
<PRE>
 33.    # BDB definition for example.net
 34.    database bdb
 35.    suffix &quot;dc=example,dc=net&quot;
 36.    directory /usr/local/var/openldap-data-net
 37.    rootdn &quot;cn=Manager,dc=example,dc=com&quot;
 38.    index objectClass eq
 39.    access to * by users read
</PRE>
<P></P>
</DIV>
<DIV CLASS="footer">
<HR>
<DIV CLASS="navigate">
<P ALIGN="Center"><A HREF="index.html">Contents</A> | <A HREF="index.html">Parent Topic</A> | <A HREF="slapdconf2.html">Previous Topic</A> | <A HREF="runningslapd.html">Next Topic</A> <BR><A HREF="http://www.openldap.org/">Home</A> | <A HREF="../index.html">Catalog</A></P>
</DIV>
<P>
<FONT COLOR="#808080" FACE="Arial,Verdana,Helvetica" SIZE="1"><B>
________________<BR>
<SMALL>&copy; Copyright 2011, <A HREF="http://www.OpenLDAP.org/foundation/">OpenLDAP Foundation</A>, <A HREF="mailto:info@OpenLDAP.org">info@OpenLDAP.org</A></SMALL></B></FONT>

</DIV>

</BODY>
</HTML>