Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am struggling quite a while now, googled a lot and I have not yet been able to figure this - hopefully - simple problem out. I am a beginner in ldap so I might be missing something very obvious ... I have a pretty simple slapd.conf:

include     /private/etc/openldap/schema/core.schema
pidfile     /private/var/db/openldap/run/slapd.pid
argsfile    /private/var/db/openldap/run/slapd.args
database    bdb
suffix      "dc=ronr,dc=nl"
rootdn      "cn=manager,dc=ronr,dc=nl"
rootpw      zz
directory   /private/var/db/openldap/openldap-data
index   objectClass eq

and a ldap.conf:

URI ldap://localhost

and started slapd. When trying to connect to the rootdn using

ldapadd -x -D "cn=manager,dc=ronr,dc=nl" -w zz -f add_base.ldif -h localhost -d255

I get: ldap_bind: Invalid credentials (49)

In the debug level 250 trace of slapd I get:

slapd startup: initiated.
backend_startup_one: starting "cn=config"
config_back_db_open
config_build_entry: "cn=config"
config_build_entry: "cn=schema"
config_build_entry: "cn={0}core"
config_build_entry: "olcDatabase={-1}frontend"
config_build_entry: "olcDatabase={0}config"
config_build_entry: "olcDatabase={1}bdb"
backend_startup_one: starting "dc=ronr,dc=nl"
bdb_db_open: database "dc=ronr,dc=nl": dbenv_open(/private/var/db/openldap/openldap-data).
bdb_monitor_db_open: monitoring disabled; configure monitor database to enable
slapd starting
slap_listener_activate(7): 
>>> slap_listener(ldap:///)
connection_get(13): got connid=0
connection_read(13): checking for input on id=0
ber_get_next
ber_get_next: tag 0x30 len 38 contents:
ber_get_next
conn=0 op=0 do_bind
ber_scanf fmt ({imt) ber:
ber_scanf fmt (m}) ber:
>>> dnPrettyNormal: <cn=manager,dc=ronr,dc=nl>
<<< dnPrettyNormal: <cn=manager,dc=ronr,dc=nl>, <cn=manager,dc=ronr,dc=nl>
do_bind: version=3 dn="cn=manager,dc=ronr,dc=nl" method=128
bdb_dn2entry("cn=manager,dc=ronr,dc=nl")
=> bdb_dn2id("dc=ronr,dc=nl")
**<= bdb_dn2id: get failed: DB_NOTFOUND: No matching key/data pair found (-30989)**
send_ldap_result: conn=0 op=0 p=3
send_ldap_response: msgid=1 tag=97 err=49
ber_flush2: 14 bytes to sd 13
connection_get(13): got connid=0
connection_read(13): checking for input on id=0
ber_get_next
ber_get_next on fd 13 failed errno=0 (Undefined error: 0)
connection_closing: readying conn=0 sd=13 for close
connection_close: conn=0 sd=13

I suspect that the line

<= bdb_dn2id: get failed: DB_NOTFOUND: No matching key/data pair found (-30989)

is trying to tell me the real problem. Point is I have no idea what is missing here. How can I fix this? Should I do something extra to administer the password, other than just putting it in the slapd.conf as I did, if so, what should I do? FWIW: I am running this on MacOSX (10.6.6)

any helpful tip/suggestion is very much appreciated. Ronald.

share|improve this question
    
I tested on Linux and it worked, with apparently the same config. So I decided to install openldap from ftp.nl.uu.net/pub/unix/db/openldap/openldap-release/… using ./config --prefix=/usr/local This resulted in an error regarding a wrong version of Berkelydb. So I downloaded download.oracle.com/berkeley-db/db-4.8.30.tar.gz ran configure --prefix=/usr/local, installed it and ran configure for openldap again with more luck. After installation it worked right away, no problems ever since. Not that I can say that I know what the problem was but for me it is enough. R. –  ik_zelf Feb 14 '11 at 21:48

1 Answer 1

up vote 0 down vote accepted

I tested on Linux and it worked, with apparently the same config. So I decided to install openldap from ftp.nl.uu.net/pub/unix/db/openldap/openldap-release/… using ./config --prefix=/usr/local This resulted in an error regarding a wrong version of Berkelydb. So I downloaded download.oracle.com/berkeley-db/db-4.8.30.tar.gz ran configure --prefix=/usr/local, installed it and ran configure for openldap again with more luck. After installation it worked right away, no problems ever since. Not that I can say that I know what the problem was but for me it is enough.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.