xref: /netbsd-src/external/bsd/openldap/dist/doc/guide/admin/appendix-common-errors.sdf (revision e670fd5c413e99c2f6a37901bb21c537fcd322d2)
1d11b170bStron# $OpenLDAP$
2*e670fd5cSchristos# Copyright 2007-2021 The OpenLDAP Foundation, All Rights Reserved.
32de962bdSlukem# COPYING RESTRICTIONS APPLY, see COPYRIGHT.
42de962bdSlukem
52de962bdSlukemH1: Common errors encountered when using OpenLDAP Software
62de962bdSlukem
72de962bdSlukemThe following sections attempt to summarize the most common causes of LDAP errors
82de962bdSlukemwhen using OpenLDAP
92de962bdSlukem
102de962bdSlukemH2: Common causes of LDAP errors
112de962bdSlukem
122de962bdSlukemH3: ldap_*: Can't contact LDAP server
132de962bdSlukem
14d11b170bStronThe {{B:Can't contact LDAP server}} error is usually returned when the LDAP
152de962bdSlukemserver cannot be contacted. This may occur for many reasons:
162de962bdSlukem
172de962bdSlukem* the LDAP server is not running; this can be checked by running, for example,
182de962bdSlukem
192de962bdSlukem>      telnet <host> <port>
202de962bdSlukem
212de962bdSlukemreplacing {{<host>}} and {{<port>}} with the hostname and the port the server
222de962bdSlukemis supposed to listen on.
232de962bdSlukem* the client has not been instructed to contact a running server; with OpenLDAP
242de962bdSlukemcommand-line tools this is accomplished by providing the -H switch, whose
252de962bdSlukemargument is a valid LDAP url corresponding to the interface the server is
262de962bdSlukemsupposed to be listening on.
272de962bdSlukem
282de962bdSlukemH3: ldap_*: No such object
292de962bdSlukem
302de962bdSlukemThe {{B:no such object}} error is generally returned when the target DN of the
312de962bdSlukemoperation cannot be located. This section details reasons common to all
322de962bdSlukemoperations. You should also look for answers specific to the operation
332de962bdSlukem(as indicated in the error message).
342de962bdSlukem
352de962bdSlukemThe most common reason for this error is non-existence of the named object. First,
362de962bdSlukemcheck for typos.
372de962bdSlukem
382de962bdSlukemAlso note that, by default, a new directory server holds no objects
392de962bdSlukem(except for a few system entries). So, if you are setting up a new directory
402de962bdSlukemserver and get this message, it may simply be that you have yet to add the
412de962bdSlukemobject you are trying to locate.
422de962bdSlukem
432de962bdSlukemThe error commonly occurs because a DN was not specified and a default was not
442de962bdSlukemproperly configured.
452de962bdSlukem
462de962bdSlukemIf you have a suffix specified in slapd.conf eg.
472de962bdSlukem
482de962bdSlukem>      suffix "dc=example,dc=com"
492de962bdSlukem
502de962bdSlukemYou should use
512de962bdSlukem
522de962bdSlukem>      ldapsearch -b 'dc=example,dc=com' '(cn=jane*)'
532de962bdSlukem
542de962bdSlukemto tell it where to start the search.
552de962bdSlukem
562de962bdSlukemThe {{F:-b}} should be specified for all LDAP commands unless you have an
572de962bdSlukem{{ldap.conf}}(5) default configured.
582de962bdSlukem
592de962bdSlukemSee {{ldapsearch}}(1), {{ldapmodify}}(1)
602de962bdSlukem
612de962bdSlukemAlso, {{slapadd}}(8) and its ancillary programs are very strict about the
622de962bdSlukemsyntax of the LDIF file.
632de962bdSlukem
642de962bdSlukemSome liberties in the LDIF file may result in an apparently successful creation
652de962bdSlukemof the database, but accessing some parts of it may be difficult.
662de962bdSlukem
672de962bdSlukemOne known common error in database creation is putting a blank line before the
682de962bdSlukemfirst entry in the LDIF file. {{B:There must be no leading blank lines in the
692de962bdSlukemLDIF file.}}
702de962bdSlukem
712de962bdSlukemIt is generally recommended that {{ldapadd}}(1) be used instead of {{slapadd}}(8)
722de962bdSlukemwhen adding new entries your directory. {{slapadd}}(8) should be used to bulk
732de962bdSlukemload entries known to be valid.
742de962bdSlukem
752de962bdSlukemAnother cause of this message is a referral
762de962bdSlukem({SECT:Constructing a Distributed Directory Service}}) entry to an unpopulated
772de962bdSlukemdirectory.
782de962bdSlukem
792de962bdSlukemEither remove the referral, or add a single record with the referral base DN
802de962bdSlukemto the empty directory.
812de962bdSlukem
822de962bdSlukemThis error may also occur when slapd is unable to access the contents of its
832de962bdSlukemdatabase because of file permission problems. For instance, on a Red Hat Linux
842de962bdSlukemsystem, slapd runs as user 'ldap'. When slapadd is run as root to create a
852de962bdSlukemdatabase from scratch, the contents of {{F:/var/lib/ldap}} are created with
862de962bdSlukemuser and group root and with permission 600, making the contents inaccessible
872de962bdSlukemto the slapd server.
882de962bdSlukem
892de962bdSlukemH3: ldap_*: Can't chase referral
902de962bdSlukem
912de962bdSlukemThis is caused by the line
922de962bdSlukem
932de962bdSlukem>      referral        ldap://root.openldap.org
942de962bdSlukem
952de962bdSlukemIn {{F:slapd.conf}}, it was provided as an example for how to use referrals
962de962bdSlukemin the original file. However if your machine is not permanently connected to
972de962bdSlukemthe Internet, it will fail to find the server, and hence produce an error message.
982de962bdSlukem
992de962bdSlukemTo resolve, just place a # in front of line and restart slapd or point it to
1002de962bdSlukeman available ldap server.
1012de962bdSlukem
1022de962bdSlukemSee also: {{ldapadd}}(1), {{ldapmodify}}(1) and {{slapd.conf}}(5)
1032de962bdSlukem
1042de962bdSlukemH3: ldap_*: server is unwilling to perform
1052de962bdSlukem
1062de962bdSlukemslapd will return an unwilling to perform error if the backend holding the
1072de962bdSlukemtarget entry does not support the given operation.
1082de962bdSlukem
1092de962bdSlukemThe password backend is only willing to perform searches. It will return an
1102de962bdSlukemunwilling to perform error for all other operations.
1112de962bdSlukem
1122de962bdSlukemH3: ldap_*: Insufficient access
1132de962bdSlukem
1142de962bdSlukemThis error occurs when server denies the operation due to insufficient access.
1152de962bdSlukemThis is usually caused by binding to a DN with insufficient privileges
1162de962bdSlukem(or binding anonymously) to perform the operation.
1172de962bdSlukem
1182de962bdSlukemYou can bind as the rootdn/rootpw specified in {{slapd.conf}}(5) to gain full
1192de962bdSlukemaccess. Otherwise, you must bind to an entry which has been granted the
1202de962bdSlukemappropriate rights through access controls.
1212de962bdSlukem
1222de962bdSlukem
1232de962bdSlukemH3: ldap_*: Invalid DN syntax
1242de962bdSlukem
1252de962bdSlukemThe target (or other) DN of the operation is invalid. This implies that either
1262de962bdSlukemthe string representation of the DN is not in the required form, one of the
1272de962bdSlukemtypes in the attribute value assertions is not defined, or one of the values
1282de962bdSlukemin the attribute value assertions does not conform to the appropriate syntax.
1292de962bdSlukem
1302de962bdSlukemH3: ldap_*: Referral hop limit exceeded
1312de962bdSlukem
1322de962bdSlukemThis error generally occurs when the client chases a referral which refers
1332de962bdSlukemitself back to a server it already contacted. The server responds as it did
1342de962bdSlukembefore and the client loops. This loop is detected when the hop limit is exceeded.
1352de962bdSlukem
1362de962bdSlukemThis is most often caused through misconfiguration of the server's default
1372de962bdSlukemreferral. The default referral should not be itself:
1382de962bdSlukem
1392de962bdSlukemThat is, on {{F:ldap://myldap/}} the default referral should not be {{F:ldap://myldap/}}
1402de962bdSlukem (or any hostname/ip which is equivalent to myldap).
1412de962bdSlukem
1422de962bdSlukemH3: ldap_*: operations error
1432de962bdSlukem
1442de962bdSlukemIn some versions of {{slapd}}(8), {{operationsError}} was returned instead of other.
1452de962bdSlukem
1462de962bdSlukemH3: ldap_*: other error
1472de962bdSlukem
1482de962bdSlukemThe other result code indicates an internal error has occurred.
1492de962bdSlukemWhile the additional information provided with the result code might provide
1502de962bdSlukemsome hint as to the problem, often one will need to consult the server's log files.
1512de962bdSlukem
1522de962bdSlukemH3: ldap_add/modify: Invalid syntax
1532de962bdSlukem
1542de962bdSlukemThis error is reported when a value of an attribute does not conform to syntax
1552de962bdSlukemrestrictions. Additional information is commonly provided stating which value
1562de962bdSlukemof which attribute was found to be invalid. Double check this value and other
1572de962bdSlukemvalues (the server will only report the first error it finds).
1582de962bdSlukem
1592de962bdSlukemCommon causes include:
1602de962bdSlukem
1612de962bdSlukem* extraneous whitespace (especially trailing whitespace)
1622de962bdSlukem* improperly encoded characters (LDAPv3 uses UTF-8 encoded Unicode)
1632de962bdSlukem* empty values (few syntaxes allow empty values)
1642de962bdSlukem
1652de962bdSlukem
1662de962bdSlukemFor certain syntax, like OBJECT IDENTIFIER (OID), this error can indicate that
1672de962bdSlukemthe OID descriptor (a "short name") provided is unrecognized. For instance,
1682de962bdSlukemthis error is returned if the {{objectClass}} value provided is unrecognized.
1692de962bdSlukem
1702de962bdSlukemH3: ldap_add/modify: Object class violation
1712de962bdSlukem
1722de962bdSlukemThis error is returned with the entry to be added or the entry as modified
1732de962bdSlukemviolates the object class schema rules. Normally additional information is
1742de962bdSlukemreturned the error detailing the violation. Some of these are detailed below.
1752de962bdSlukem
1762de962bdSlukemViolations related to the entry's attributes:
1772de962bdSlukem
1782de962bdSlukem>      Attribute not allowed
1792de962bdSlukem
1802de962bdSlukemA provided attribute is not allowed by the entry's object class(es).
1812de962bdSlukem
1822de962bdSlukem>      Missing required attribute
1832de962bdSlukem
1842de962bdSlukemAn attribute required by the entry's object class(es) was not provided.
1852de962bdSlukem
1862de962bdSlukemViolations related to the entry's class(es):
1872de962bdSlukem
1882de962bdSlukem>      Entry has no objectClass attribute
1892de962bdSlukem
1902de962bdSlukemThe entry did not state which object classes it belonged to.
1912de962bdSlukem
1922de962bdSlukem>      Unrecognized objectClass
1932de962bdSlukem
1942de962bdSlukemOne (or more) of the listed objectClass values is not recognized.
1952de962bdSlukem
1962de962bdSlukem>      No structural object class provided
1972de962bdSlukem
1982de962bdSlukemNone of the listed objectClass values is structural.
1992de962bdSlukem
2002de962bdSlukem>      Invalid structural object class chain
2012de962bdSlukem
2022de962bdSlukemTwo or more structural objectClass values are not in same structural object
2032de962bdSlukemclass chain.
2042de962bdSlukem
2052de962bdSlukem>      Structural object class modification
2062de962bdSlukem
2072de962bdSlukemModify operation attempts to change the structural class of the entry.
2082de962bdSlukem
209*e670fd5cSchristos>      Instantiation of abstract objectClass.
2102de962bdSlukem
2112de962bdSlukemAn abstract class is not subordinate to any listed structural or auxiliary class.
2122de962bdSlukem
2132de962bdSlukem>      Invalid structural object class
2142de962bdSlukem
2152de962bdSlukemOther structural object class problem.
2162de962bdSlukem
2172de962bdSlukem>      No structuralObjectClass operational attribute
2182de962bdSlukem
2192de962bdSlukemThis is commonly returned when a shadow server is provided an entry which does
2202de962bdSlukemnot contain the structuralObjectClass operational attribute.
2212de962bdSlukem
2222de962bdSlukem
2232de962bdSlukemNote that the above error messages as well as the above answer assumes basic
2242de962bdSlukemknowledge of LDAP/X.500 schema.
2252de962bdSlukem
2262de962bdSlukemH3: ldap_add: No such object
2272de962bdSlukem
2282de962bdSlukemThe "ldap_add: No such object" error is commonly returned if parent of the
2292de962bdSlukementry being added does not exist. Add the parent entry first...
2302de962bdSlukem
2312de962bdSlukemFor example, if you are adding "cn=bob,dc=domain,dc=com" and you get:
2322de962bdSlukem
2332de962bdSlukem>      ldap_add: No such object
2342de962bdSlukem
2352de962bdSlukemThe entry "dc=domain,dc=com" likely doesn't exist. You can use ldapsearch to
2362de962bdSlukemsee if does exist:
2372de962bdSlukem
2382de962bdSlukem>      ldapsearch -b 'dc=domain,dc=com' -s base '(objectclass=*)'
2392de962bdSlukem
2402de962bdSlukemIf it doesn't, add it. See {{SECT:A Quick-Start Guide}} for assistance.
2412de962bdSlukem
2422de962bdSlukemNote: if the entry being added is the same as database suffix, it's parent
2432de962bdSlukemisn't required. i.e.: if your suffix is "dc=domain,dc=com", "dc=com" doesn't
2442de962bdSlukemneed to exist to add "dc=domain,dc=com".
2452de962bdSlukem
2462de962bdSlukemThis error will also occur if you try to add any entry that the server is not
2472de962bdSlukemconfigured to hold.
2482de962bdSlukem
2492de962bdSlukemFor example, if your database suffix is "dc=domain,dc=com" and you attempt to
2502de962bdSlukemadd "dc=domain2,dc=com", "dc=com", "dc=domain,dc=org", "o=domain,c=us", or an
2512de962bdSlukemother DN in the "dc=domain,dc=com" subtree, the server will return a
2522de962bdSlukem "No such object" (or referral) error.
2532de962bdSlukem
2542de962bdSlukem{{slapd}}(8) will generally return "no global superior knowledge" as additional
2552de962bdSlukeminformation indicating its return noSuchObject instead of a referral as the
2562de962bdSlukemserver is not configured with knowledge of a global superior server.
2572de962bdSlukem
2582de962bdSlukem
2592de962bdSlukemH3: ldap add: invalid structural object class chain
2602de962bdSlukem
2612de962bdSlukemThis particular error refers to the rule about STRUCTURAL objectclasses, which
2622de962bdSlukemstates that an object is of one STRUCTURAL class, the structural class of the
2632de962bdSlukemobject. The object is said to belong to this class, zero or more auxiliaries
2642de962bdSlukem classes, and their super classes.
2652de962bdSlukem
2662de962bdSlukemWhile all of these classes are commonly listed in the objectClass attribute of
2672de962bdSlukemthe entry, one of these classes is the structural object class of the entry.
2682de962bdSlukemThus, it is OK for an objectClass attribute
2692de962bdSlukemto contain inetOrgPerson, organizationalPerson, and person because they inherit
2702de962bdSlukem one from another to form a single super class chain. That is, inetOrgPerson SUPs
2712de962bdSlukemorganizationPerson SUPs person. On the other hand, it is invalid for both inetOrgPerson
2722de962bdSlukemand account to be listed in objectClass as inetOrgPerson and account are not
2732de962bdSlukempart of the same super class chain (unless some other class is also listed
2742de962bdSlukemwith is a subclass of both).
2752de962bdSlukem
2762de962bdSlukemTo resolve this problem, one must determine which class will better serve
2772de962bdSlukemstructural object class for the entry, adding this class to the objectClass
2782de962bdSlukemattribute (if not already present), and remove any other structural class from
2792de962bdSlukemthe entry's objectClass attribute which is not a super class of the structural
2802de962bdSlukemobject class.
2812de962bdSlukem
2822de962bdSlukemWhich object class is better depends on the particulars of the situation.
2832de962bdSlukemOne generally should consult the documentation for the applications one is
2842de962bdSlukemusing for help in making the determination.
2852de962bdSlukem
2862de962bdSlukemH3: ldap_add: no structuralObjectClass operational attribute
2872de962bdSlukem
2882de962bdSlukemldapadd(1) may error:
2892de962bdSlukem
2902de962bdSlukem>      adding new entry "uid=XXX,ou=People,o=campus,c=ru"
2912de962bdSlukem>        ldap_add: Internal (implementation specific) error (80)
2922de962bdSlukem>           additional info: no structuralObjectClass operational attribute
2932de962bdSlukem
2942de962bdSlukemwhen slapd(8) cannot determine, based upon the contents of the objectClass
2952de962bdSlukemattribute, what the structural class of the object should be.
2962de962bdSlukem
2972de962bdSlukem
2982de962bdSlukemH3: ldap_add/modify/rename: Naming violation
2992de962bdSlukem
3002de962bdSlukemOpenLDAP's slapd checks for naming attributes and distinguished values consistency,
3012de962bdSlukemaccording to RFC 4512.
3022de962bdSlukem
3032de962bdSlukemNaming attributes are those attributeTypes that appear in an entry's RDN;
3042de962bdSlukem distinguished values are the values of the naming attributes that appear in
3052de962bdSlukeman entry's RDN, e.g, in
3062de962bdSlukem
3072de962bdSlukem>      cn=Someone+mail=someone@example.com,dc=example,dc=com
3082de962bdSlukem
3092de962bdSlukemthe naming attributes are cn and mail, and the distinguished values are
3102de962bdSlukemSomeone and someone@example.com.
3112de962bdSlukem
3122de962bdSlukemOpenLDAP's slapd checks for consistency when:
3132de962bdSlukem
3142de962bdSlukem* adding an entry
3152de962bdSlukem* modifying an entry, if the values of the naming attributes are changed
3162de962bdSlukem* renaming an entry, if the RDN of the entry changes
3172de962bdSlukem
3182de962bdSlukemPossible causes of error are:
3192de962bdSlukem
3202de962bdSlukem* the naming attributes are not present in the entry; for example:
3212de962bdSlukem
3222de962bdSlukem>                dn: dc=example,dc=com
3232de962bdSlukem>                objectClass: organization
3242de962bdSlukem>                o: Example
3252de962bdSlukem>                # note: "dc: example" is missing
3262de962bdSlukem
3272de962bdSlukem* the naming attributes are present in the entry, but in the attributeType
3282de962bdSlukemdefinition they are marked as:
3292de962bdSlukem- collective
3302de962bdSlukem- operational
3312de962bdSlukem- obsolete
3322de962bdSlukem
3332de962bdSlukem* the naming attributes are present in the entry, but the distinguished values
3342de962bdSlukemare not; for example:
3352de962bdSlukem
3362de962bdSlukem>                dn: dc=example,dc=com
3372de962bdSlukem>                objectClass: domain
3382de962bdSlukem>                dc: foobar
3392de962bdSlukem>                # note: "dc" is present, but the value is not "example"
3402de962bdSlukem
3412de962bdSlukem* the naming attributes are present in the entry, with the distinguished values, but the naming attributes:
3422de962bdSlukem- do not have an equality field, so equality cannot be asserted
3432de962bdSlukem- the matching rule is not supported (yet)
3442de962bdSlukem- the matching rule is not appropriate
3452de962bdSlukem
3462de962bdSlukem* the given distinguished values do not comply with their syntax
3472de962bdSlukem
3482de962bdSlukem* other errors occurred during the validation/normalization/match process;
3492de962bdSlukemthis is a catchall: look at previous logs for details in case none of the above
3502de962bdSlukemapply to your case.
3512de962bdSlukem
3522de962bdSlukemIn any case, make sure that the attributeType definition for the naming attributes
3532de962bdSlukemcontains an appropriate EQUALITY field; or that of the superior, if they are
3542de962bdSlukemdefined based on a superior attributeType (look at the SUP field). See RFC 4512 for details.
3552de962bdSlukem
3562de962bdSlukem
3572de962bdSlukemH3: ldap_add/delete/modify/rename: no global superior knowledge
3582de962bdSlukem
3592de962bdSlukemIf the target entry name places is not within any of the databases the server
3602de962bdSlukemis configured to hold and the server has no knowledge of a global superior,
3612de962bdSlukemthe server will indicate it is unwilling to perform the operation and provide
3622de962bdSlukemthe text "no global superior knowledge" as additional text.
3632de962bdSlukem
3642de962bdSlukemLikely the entry name is incorrect, or the server is not properly configured
3652de962bdSlukemto hold the named entry, or, in distributed directory environments, a default
3662de962bdSlukemreferral was not configured.
3672de962bdSlukem
3682de962bdSlukem
3692de962bdSlukemH3: ldap_bind: Insufficient access
3702de962bdSlukem
3712de962bdSlukemCurrent versions of slapd(8) requires that clients have authentication
3722de962bdSlukempermission to attribute types used for authentication purposes before accessing
3732de962bdSlukemthem to perform the bind operation. As all bind operations are done anonymously
3742de962bdSlukem(regardless of previous bind success), the auth access must be granted to anonymous.
3752de962bdSlukem
3762de962bdSlukemIn the example ACL below grants the following access:
3772de962bdSlukem
3782de962bdSlukem* to anonymous users:
3792de962bdSlukem- permission to authenticate using values of userPassword
3802de962bdSlukem* to authenticated users:
3812de962bdSlukem- permission to update (but not read) their userPassword
3822de962bdSlukem- permission to read any object excepting values of userPassword
3832de962bdSlukem
3842de962bdSlukemAll other access is denied.
3852de962bdSlukem
3862de962bdSlukem>        access to attr=userPassword
3872de962bdSlukem>          by self =w
3882de962bdSlukem>          by anonymous auth
3892de962bdSlukem
3902de962bdSlukem>        access *
3912de962bdSlukem>          by self write
3922de962bdSlukem>          by users read
3932de962bdSlukem
3942de962bdSlukem
3952de962bdSlukemH3: ldap_bind: Invalid credentials
3962de962bdSlukem
3972de962bdSlukemThe error usually occurs when the credentials (password) provided does not
3982de962bdSlukemmatch the userPassword held in entry you are binding to.
3992de962bdSlukem
4002de962bdSlukemThe error can also occur when the bind DN specified is not known to the server.
4012de962bdSlukem
4022de962bdSlukemCheck both! In addition to the cases mentioned above you should check if the
4032de962bdSlukemserver denied access to userPassword on selected parts of the directory. In
4042de962bdSlukemfact, slapd always returns "Invalid credentials" in case of failed bind,
4052de962bdSlukemregardless of the failure reason, since other return codes could reveal the
4062de962bdSlukemvalidity of the user's name.
4072de962bdSlukem
4082de962bdSlukemTo debug access rules defined in slapd.conf, add "ACL" to log level.
4092de962bdSlukem
4102de962bdSlukemH3: ldap_bind: Protocol error
4112de962bdSlukem
4122de962bdSlukemThere error is generally occurs when the LDAP version requested by the
4132de962bdSlukemclient is not supported by the server.
4142de962bdSlukem
4152de962bdSlukemThe OpenLDAP Software 2.x server, by default, only accepts version 3 LDAP Bind
4162de962bdSlukemrequests but can be configured to accept a version 2 LDAP Bind request.
4172de962bdSlukem
4182de962bdSlukemNote: The 2.x server expects LDAPv3 [RFC4510] to be used when the client
4192de962bdSlukemrequests version 3 and expects a limited LDAPv3 variant (basically, LDAPv3
4202de962bdSlukemsyntax and semantics in an LDAPv2 PDUs) to be used when version 2 is expected.
4212de962bdSlukem
4222de962bdSlukemThis variant is also sometimes referred to as LDAPv2+, but differs from the U-Mich
4232de962bdSlukemLDAP variant in a number of ways.
4242de962bdSlukem
4252de962bdSlukemH3: ldap_modify: cannot modify object class
4262de962bdSlukem
4272de962bdSlukemThis message is commonly returned when attempting to modify the objectClass
4282de962bdSlukemattribute in a manner inconsistent with the LDAP/X.500 information model. In
4292de962bdSlukemparticular, it commonly occurs when one tries to change the structure of the
4302de962bdSlukemobject from one class to another, for instance, trying to change an 'apple'
4312de962bdSlukeminto a 'pear' or a 'fruit' into a 'pear'.
4322de962bdSlukem
4332de962bdSlukemSuch changes are disallowed by the slapd(8) in accordance with LDAP and X.500 restrictions.
4342de962bdSlukem
4352de962bdSlukem
4362de962bdSlukemH3: ldap_sasl_interactive_bind_s: ...
4372de962bdSlukem
4382de962bdSlukemIf you intended to bind using a DN and password and get an error from
4392de962bdSlukemldap_sasl_interactive_bind_s, you likely forgot to provide a '-x' option to
4402de962bdSlukemthe command. By default, SASL authentication is used. '-x' is necessary to
4412de962bdSlukemselect "simple" authentication.
4422de962bdSlukem
4432de962bdSlukem
4442de962bdSlukemH3: ldap_sasl_interactive_bind_s: No such Object
4452de962bdSlukem
4462de962bdSlukemThis indicates that LDAP SASL authentication function could not read the
4472de962bdSlukemRoot DSE.
4482de962bdSlukemThe error will occur when the server doesn't provide a root DSE. This may be
4492de962bdSlukemdue to access controls.
4502de962bdSlukem
4512de962bdSlukem
4522de962bdSlukemH3: ldap_sasl_interactive_bind_s: No such attribute
4532de962bdSlukem
4542de962bdSlukemThis indicates that LDAP SASL authentication function could read the Root
4552de962bdSlukemDSE but it contained no supportedSASLMechanism attribute.
4562de962bdSlukem
4572de962bdSlukemThe supportedSASLmechanism attribute lists mechanisms currently available.
4582de962bdSlukemThe list may be empty because none of the supported mechanisms are currently
4592de962bdSlukemavailable. For example, EXTERNAL is listed only if the client has established
4602de962bdSlukemits identity by authenticating at a lower level (e.g. TLS).
4612de962bdSlukem
4622de962bdSlukemNote: the attribute may not be visible due to access controls
4632de962bdSlukem
4642de962bdSlukemNote: SASL bind is the default for all OpenLDAP tools, e.g. ldapsearch(1), ldapmodify(1). To force use of "simple" bind, use the "-x" option. Use of "simple" bind is not recommended unless one has adequate confidentiality protection in place (e.g. TLS/SSL, IPSEC).
4652de962bdSlukem
4662de962bdSlukemH3: ldap_sasl_interactive_bind_s: Unknown authentication method
4672de962bdSlukem
4682de962bdSlukemThis indicates that none of the SASL authentication supported by the server
4692de962bdSlukemare supported by the client, or that they are too weak or otherwise inappropriate
4702de962bdSlukemfor use by the client. Note that the default security options disallows the use
4712de962bdSlukemof certain mechanisms such as ANONYMOUS and PLAIN (without TLS).
4722de962bdSlukem
4732de962bdSlukemNote: SASL bind is the default for all OpenLDAP tools. To force use of "simple" bind, use the "-x" option. Use of "simple" bind is not recommended unless one has adequate confidentiality protection in place (e.g. TLS/SSL, IPSEC).
4742de962bdSlukem
4752de962bdSlukemH3: ldap_sasl_interactive_bind_s: Local error (82)
4762de962bdSlukem
4772de962bdSlukemApparently not having forward and reverse DNS entries for the LDAP server can result in this error.
4782de962bdSlukem
4792de962bdSlukem
4802de962bdSlukemH3: ldap_search: Partial results and referral received
4812de962bdSlukem
4822de962bdSlukemThis error is returned with the server responses to an LDAPv2 search query
4832de962bdSlukemwith both results (zero or more matched entries) and references (referrals to other servers).
4842de962bdSlukemSee also: ldapsearch(1).
4852de962bdSlukem
4862de962bdSlukemIf the updatedn on the replica does not exist, a referral will be returned.
4872de962bdSlukemIt may do this as well if the ACL needs tweaking.
4882de962bdSlukem
4892de962bdSlukemH3: ldap_start_tls: Operations error
4902de962bdSlukem
4912de962bdSlukemldapsearch(1) and other tools will return
4922de962bdSlukem
4932de962bdSlukem>        ldap_start_tls: Operations error (1)
4942de962bdSlukem>              additional info: TLS already started
4952de962bdSlukem
4962de962bdSlukemWhen the user (though command line options and/or ldap.conf(5)) has requested
4972de962bdSlukemTLS (SSL) be started twice. For instance, when specifying both "-H ldaps://server.do.main" and "-ZZ".
4982de962bdSlukem
4992de962bdSlukemH2: Other Errors
5002de962bdSlukem
5012de962bdSlukemH3: ber_get_next on fd X failed errno=34 (Numerical result out of range)
5022de962bdSlukem
5032de962bdSlukemThis slapd error generally indicates that the client sent a message that
5042de962bdSlukemexceeded an administrative limit. See sockbuf_max_incoming and sockbuf_max_incoming_auth
5052de962bdSlukemconfiguration directives in slapd.conf(5).
5062de962bdSlukem
5072de962bdSlukemH3: ber_get_next on fd X failed errno=11 (Resource temporarily unavailable)
5082de962bdSlukem
5092de962bdSlukemThis message is not indicative of abnormal behavior or error. It simply means
5102de962bdSlukemthat expected data is not yet available from the resource, in this context, a
5112de962bdSlukemnetwork socket. slapd(8) will process the data once it does becomes available.
5122de962bdSlukem
5132de962bdSlukemH3: daemon: socket() failed errno=97 (Address family not supported)
5142de962bdSlukem
5152de962bdSlukemThis message indicates that the operating system does not support one of the
5162de962bdSlukem(protocol) address families which slapd(8) was configured to support. Most
5172de962bdSlukemcommonly, this occurs when slapd(8) was configured to support IPv6 yet the
5182de962bdSlukemoperating system kernel wasn't. In such cases, the message can be ignored.
5192de962bdSlukem
5202de962bdSlukemH3: GSSAPI: gss_acquire_cred: Miscellaneous failure; Permission denied;
5212de962bdSlukem
5222de962bdSlukemThis message means that slapd is not running as root and, thus, it cannot get
5232de962bdSlukemits Kerberos 5 key from the keytab, usually file /etc/krb5.keytab.
5242de962bdSlukem
5252de962bdSlukemA keytab file is used to store keys that are to be used by services or daemons
5262de962bdSlukemthat are started at boot time. It is very important that these secrets are kept
5272de962bdSlukembeyond reach of intruders.
5282de962bdSlukem
5292de962bdSlukemThat's why the default keytab file is owned by root and protected from being
5302de962bdSlukemread by others. Do not mess with these permissions, build a different keytab
531d11b170bStronfile for slapd instead, and make sure it is owned by the user that slapd
532d11b170bStronruns as.
5332de962bdSlukem
5342de962bdSlukemTo do this, start kadmin, and enter the following commands:
5352de962bdSlukem
5362de962bdSlukem>     addprinc -randkey ldap/ldap.example.com@EXAMPLE.COM
5372de962bdSlukem>     ktadd -k /etc/openldap/ldap.keytab ldap/ldap.example.com@EXAMPLE.COM
5382de962bdSlukem
5392de962bdSlukemThen, on the shell, do:
5402de962bdSlukem
541d11b170bStron>     chown ldap:ldap /etc/openldap/ldap.keytab
5422de962bdSlukem>     chmod 600 /etc/openldap/ldap.keytab
5432de962bdSlukem
5442de962bdSlukemNow you have to tell slapd (well, actually tell the gssapi library in Kerberos 5
5452de962bdSlukemthat is invoked by Cyrus SASL) where to find the new keytab. You do this by
5462de962bdSlukemsetting the environment variable KRB5_KTNAME like this:
5472de962bdSlukem
5482de962bdSlukem>     export KRB5_KTNAME="FILE:/etc/openldap/ldap.keytab"
5492de962bdSlukem
5502de962bdSlukemSet that environment variable on the slapd start script (Red Hat users might
5512de962bdSlukemfind /etc/sysconfig/ldap a perfect place).
5522de962bdSlukem
5532de962bdSlukemThis only works if you are using MIT kerberos. It doesn't work with Heimdal,
5542de962bdSlukemfor instance.
5552de962bdSlukem
5562de962bdSlukem
5572de962bdSlukemIn Heimdal there is a function gsskrb5_register_acceptor_identity() that sets
5582de962bdSlukemthe path of the keytab file you want to use. In Cyrus SASL 2 you can add
5592de962bdSlukem
5602de962bdSlukem>    keytab: /path/to/file
5612de962bdSlukem
5622de962bdSlukemto your application's SASL config file to use this feature. This only works with Heimdal.
5632de962bdSlukem
5642de962bdSlukem
5652de962bdSlukemH3: access from unknown denied
5662de962bdSlukem
5672de962bdSlukemThis related to TCP wrappers. See hosts_access(5) for more information.
5682de962bdSlukemin the log file: "access from unknown denied" This related to TCP wrappers.
5692de962bdSlukemSee hosts_access(5) for more information.
5702de962bdSlukemfor example: add the line "slapd: .hosts.you.want.to.allow" in /etc/hosts.allow
5712de962bdSlukemto get rid of the error.
5722de962bdSlukem
5732de962bdSlukemH3: ldap_read: want=# error=Resource temporarily unavailable
5742de962bdSlukem
5752de962bdSlukemThis message occurs normally. It means that pending data is not yet available
5762de962bdSlukemfrom the resource, a network socket. slapd(8) will process the data once it
5772de962bdSlukembecomes available.
5782de962bdSlukem
5792de962bdSlukemH3: `make test' fails
5802de962bdSlukem
5812de962bdSlukemSome times, `make test' fails at the very first test with an obscure message like
5822de962bdSlukem
5832de962bdSlukem>    make test
584*e670fd5cSchristos>    make[1]: Entering directory `/ldap_files/openldap-2.5.0/tests'
585*e670fd5cSchristos>    make[2]: Entering directory `/ldap_files/openldap-2.5.0/tests'
586*e670fd5cSchristos>    Initiating LDAP tests for MDB...
5872de962bdSlukem>    Cleaning up test run directory leftover from previous run.
5882de962bdSlukem>     Running ./scripts/all...
589*e670fd5cSchristos>    >>>>> Executing all LDAP tests for mdb
5902de962bdSlukem>    >>>>> Starting test000-rootdse ...
5912de962bdSlukem>    running defines.sh
5922de962bdSlukem>    Starting slapd on TCP/IP port 9011...
5932de962bdSlukem>    Using ldapsearch to retrieve the root DSE...
5942de962bdSlukem>    Waiting 5 seconds for slapd to start...
5952de962bdSlukem>    ./scripts/test000-rootdse: line 40: 10607 Segmentation fault $SLAPD -f $CONF1 -h $URI1 -d $LVL $TIMING >$LOG1 2>&1
5962de962bdSlukem>    Waiting 5 seconds for slapd to start...
5972de962bdSlukem>    Waiting 5 seconds for slapd to start...
5982de962bdSlukem>    Waiting 5 seconds for slapd to start...
5992de962bdSlukem>    Waiting 5 seconds for slapd to start...
6002de962bdSlukem>    Waiting 5 seconds for slapd to start...
6012de962bdSlukem>    ./scripts/test000-rootdse: kill: (10607) - No such pid
6022de962bdSlukem>    ldap_sasl_bind_s: Can't contact LDAP server (-1)
6032de962bdSlukem>    >>>>> Test failed
6042de962bdSlukem>    >>>>> ./scripts/test000-rootdse failed (exit 1)
605*e670fd5cSchristos>    make[2]: *** [mdb-yes] Error 1
606*e670fd5cSchristos>    make[2]: Leaving directory `/ldap_files/openldap-2.5.0/tests'
6072de962bdSlukem>    make[1]: *** [test] Error 2
608*e670fd5cSchristos>    make[1]: Leaving directory `/ldap_files/openldap-2.5.0/tests'
6092de962bdSlukem>    make: *** [test] Error 2
6102de962bdSlukem
6112de962bdSlukemor so. Usually, the five lines
6122de962bdSlukem
6132de962bdSlukem    Waiting 5 seconds for slapd to start...
6142de962bdSlukem
6152de962bdSlukemindicate that slapd didn't start at all.
6162de962bdSlukem
6172de962bdSlukemIn tests/testrun/slapd.1.log there is a full log of what slapd wrote while
6182de962bdSlukemtrying to start. The log level can be increased by setting the environment
6192de962bdSlukemvariable SLAPD_DEBUG to the corresponding value; see loglevel in slapd.conf(5)
6202de962bdSlukemfor the meaning of log levels.
6212de962bdSlukem
6222de962bdSlukemA typical reason for this behavior is a runtime link problem, i.e. slapd cannot
6232de962bdSlukemfind some dynamic libraries it was linked against. Try running ldd(1) on slapd
6242de962bdSlukem(for those architectures that support runtime linking).
6252de962bdSlukem
6262de962bdSlukemThere might well be other reasons; the contents of the log file should help
6272de962bdSlukemclarifying them.
6282de962bdSlukem
6292de962bdSlukemTests that fire up multiple instances of slapd typically log to tests/testrun/slapd.<n>.log,
6302de962bdSlukemwith a distinct <n> for each instance of slapd; list tests/testrun/ for possible
6312de962bdSlukemvalues of <n>.
6322de962bdSlukem
6332de962bdSlukemH3: ldap_*: Internal (implementation specific) error (80) - additional info: entry index delete failed
6342de962bdSlukem
635*e670fd5cSchristosThis seems to be related with wrong ownership of the MDB's dir (/var/lib/ldap)
636d11b170bStronand files. The files must be owned by the user that slapd runs as.
6372de962bdSlukem
638d11b170bStron>    chown -R ldap:ldap /var/lib/ldap
6392de962bdSlukem
6402de962bdSlukemfixes it in Debian
6412de962bdSlukem
6422de962bdSlukem
6432de962bdSlukemH3: ldap_sasl_interactive_bind_s: Can't contact LDAP server (-1)
6442de962bdSlukem
6452de962bdSlukemUsing SASL, when a client contacts LDAP server, the slapd service dies
6462de962bdSlukemimmediately and client gets an error :
6472de962bdSlukem
6482de962bdSlukem>     SASL/GSSAPI authentication started ldap_sasl_interactive_bind_s: Can't contact LDAP server (-1)
6492de962bdSlukem
6502de962bdSlukemThen check the slapd service, it stopped.
651