[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: ldapadd "ldap_bind: Invalid credentials (49)"



> -----Original Message-----
> From: Quanah Gibson-Mount [mailto:quanah@zimbra.com] 
> Sent: Thursday, August 29, 2013 4:25 PM
> To: Clint Petty
> Cc: openldap-technical@openldap.org
> Subject: RE: ldapadd "ldap_bind: Invalid credentials (49)"
> 
> --On Thursday, August 29, 2013 11:20 PM +0000 Clint Petty 
> <cpetty@luthresearch.com> wrote:
> 
>> dbenv_open(/var/lib/ldap). 521fd341 bdb(dc=luthresearch,dc=net): Program
>> version 4.6 doesn't match environment version 4.7 521fd341 bdb_db_open:
>> database "dc=luthresearch,dc=net" cannot be opened, err -30972. Restore
>> from backup!
> 
>> I already covered this with you.  Your old openldap build used BDB 4.6. 
>> Your new OpenLDAP build uses BDB 4.7.  You need to delete the ldap database 
>> on this server, slapcat the db on your other server, and slapadd that 
>> export into this server, or start over from scratch.  I also noted why 
>> using /var/lib/ldap is likely not a wise idea for your db, as it conflicts 
>> with the system defaults.
> 
>> --Quanah
> 
> 
> I deleted the all files in /var/lib/ldap & /usr/local/openldap/var/openldap-data, for they were database files in both locations.  Ran slapcat -l ldif on the original server, and copied that file to the new server, and ran the following:
> 
> # slapadd -l ldif
> 521fe3a5 /usr/local/openldap/etc/openldap/slapd.conf: line 5: unknown directive <dn:> outside backend info and database definitions.
> slapadd: bad configuration file!
> 
> Line 5 in /usr/local/openldap/etc/openldap/slapd.conf file is:
> 
> dn: cn=config
> 
> I did change the entry in /usr/local/openldap/etc/openldap/slapd.conf file to the following:
> olcDbDirectory:    /usr/local/openldap/var/openldap-data
> not sure why it is still looking in /var/lib/ldap
> 
> Clint

> Read the man page for slapadd and use -F correctly with it

> --Quanah

I renamed /usr/local/openldap/etc/openldap/slapd.conf to /usr/local/openldap/etc/openldap/slapd.conf.example, since I am using cn=config.

I ran the following slapadd command:
# slapadd -F /usr/local/etc/openldap/slapd.d -n 0 -l /tmp/ldif
slapadd: line 1: database #0 (cn=config) not configured to hold "dc=myplace,dc=local"; no database configured for that naming context
_                       0.88% eta   none elapsed            none spd   1.4 M/s 
Closing DB...
#

It appears somewhere in my cn=config directory structure there is an entry "dc=myplace,dc=local" that should reflect my company.  I searched for this entry in my /usr/local/etc/openldap/slapd.d directory structure, however is not in any of those files.  How can I change this?

Thanks,

Clint