Hi,
I'm trying to migrate data using openldap migrations tools, however I keep get error below which I don't understand. I don;t even know where ldap is getting the second database from cause I don;t have that defined anywhere slapd.conf has only one database.
Error: ------------------
The first database does not allow slapadd; using the first available one (2) slapadd: line 1: database #2 (dc=my-domain,dc=com) not configured to hold "dc=4things,dc=co,dc=za"; no database configured for that naming context
slapd.conf : ------------------
# ###### SAMPLE 1 - SIMPLE DIRECTORY ############ # # NOTES: inetorgperson picks up attributes and objectclasses # from all three schemas # # NB: RH Linux schemas in /etc/openldap # include /usr/local/etc/openldap/schema/core.schema include /usr/local/etc/openldap/schema/cosine.schema include /usr/local/etc/openldap/schema/inetorgperson.schema
# NO SECURITY - no access clause # defaults to anonymous access for read # only rootdn can write
# NO REFERRALS
# DON'T bother with ARGS file unless you feel strongly # slapd scripts stop scripts need this to work pidfile /var/run/slapd.pid
# enable a lot of logging - we might need it # but generates huge logs loglevel -1
# MODULELOAD definitions # not required (comment out) before version 2.3 moduleload back_bdb.la
# NO TLS-enabled connections
# backend definition not required
####################################################################### # bdb database definitions # # replace example and com below with a suitable domain # # If you don't have a domain you can leave it since example.com # is reserved for experimentation or change them to my and inc # #######################################################################
database bdb suffix "dc=4things, dc=co, dc=za"
# root or superuser rootdn "cn=system-admin, dc=4things, dc=co, dc=za" rootpw {SSHA}password # The database directory MUST exist prior to running slapd AND # change path as necessary directory /var/lib/ldap/4things.co.za
# Indices to maintain for this directory # unique id so equality match only index uid eq # allows general searching on commonname, givenname and email index cn,gn,mail eq,sub # allows multiple variants on surname searching index sn eq,sub # sub above includes subintial,subany,subfinal # optimise department searches index ou eq # if searches will include objectClass uncomment following # index objectClass eq # shows use of default index parameter index default eq,sub # indices missing - uses default eq,sub index telephonenumber
# other database parameters # read more in slapd.conf reference section cachesize 10000 checkpoint 128 15
Any ideas? I have Googled for almost a week now and I come across nothing...
Kwasi,
Your openldap version support two methods of configuration: 1) slapd.conf (historical config file) 2) slapd.d (newer config that itself is a 'db' saved in files in the dir structure under slapd.d - never touch those files, use openldap ldif modification tools to manage)
If the slapd.d dir exists, it will be used instead of slapd.conf.
That is considered the first database (by slapadd in this case).
The OpenLDAP Admin guide might be long, and you might be short on time, but you really should read it at least far enough to learn about slapd.d and slapd.conf. It's not a complete how-to - the man pages are considered authoritative - but it does offer explanation and some limited examples. I recommend you find the time to read it, and
Good luck, - chris
________________________________ From: openldap-technical-bounces@OpenLDAP.org openldap-technical-bounces@OpenLDAP.org To: openldap-technical@openldap.org openldap-technical@openldap.org Sent: Tue Jan 24 21:13:02 2012 Subject: slapadd not allowed on first database
Hi,
I'm trying to migrate data using openldap migrations tools, however I keep get error below which I don't understand. I don;t even know where ldap is getting the second database from cause I don;t have that defined anywhere slapd.conf has only one database.
Error: ------------------
The first database does not allow slapadd; using the first available one (2) slapadd: line 1: database #2 (dc=my-domain,dc=com) not configured to hold "dc=4things,dc=co,dc=za"; no database configured for that naming context
slapd.conf : ------------------
# ###### SAMPLE 1 - SIMPLE DIRECTORY ############ # # NOTES: inetorgperson picks up attributes and objectclasses # from all three schemas # # NB: RH Linux schemas in /etc/openldap # include /usr/local/etc/openldap/schema/core.schema include /usr/local/etc/openldap/schema/cosine.schema include /usr/local/etc/openldap/schema/inetorgperson.schema
# NO SECURITY - no access clause # defaults to anonymous access for read # only rootdn can write
# NO REFERRALS
# DON'T bother with ARGS file unless you feel strongly # slapd scripts stop scripts need this to work pidfile /var/run/slapd.pid
# enable a lot of logging - we might need it # but generates huge logs loglevel -1
# MODULELOAD definitions # not required (comment out) before version 2.3 moduleload back_bdb.lahttp://back_bdb.la
# NO TLS-enabled connections
# backend definition not required
####################################################################### # bdb database definitions # # replace example and com below with a suitable domain # # If you don't have a domain you can leave it since example.comhttp://example.com # is reserved for experimentation or change them to my and inc # #######################################################################
database bdb suffix "dc=4things, dc=co, dc=za"
# root or superuser rootdn "cn=system-admin, dc=4things, dc=co, dc=za" rootpw {SSHA}password # The database directory MUST exist prior to running slapd AND # change path as necessary directory /var/lib/ldap/4things.co.zahttp://4things.co.za
# Indices to maintain for this directory # unique id so equality match only index uid eq # allows general searching on commonname, givenname and email index cn,gn,mail eq,sub # allows multiple variants on surname searching index sn eq,sub # sub above includes subintial,subany,subfinal # optimise department searches index ou eq # if searches will include objectClass uncomment following # index objectClass eq # shows use of default index parameter index default eq,sub # indices missing - uses default eq,sub index telephonenumber
# other database parameters # read more in slapd.conf reference section cachesize 10000 checkpoint 128 15
Any ideas? I have Googled for almost a week now and I come across nothing...
-- [http://4things.co.za/assets/logo.gif] Multimedia and Communication | Property | Entertainment Kwasi Owusu Gyasi - Agyei
cell (+27) (0) 76 466 4488 website www.4things.co.zahttp://www.4things.co.za email kwasi.gyasiagyei@4things.co.zamailto:kwasi.gyasiagyei@4things.co.za skype kwasi.gyasiagyei role Developer.Designer.Software Architect
________________________________ This message is private and confidential. If you have received it in error, please notify the sender and remove it from your system.
Kwasi,
Kwasi Gyasi - Agyei schrieb (25.01.2012 05:13 Uhr):
I'm trying to migrate data using openldap migrations tools, however I keep get error below which I don't understand. I don;t even know where ldap is getting the second database from cause I don;t have that defined anywhere slapd.conf has only one database.
Error:
The first database does not allow slapadd; using the first available one (2)
This is not your problem. The first database is cn=config, which is what chris says.
slapadd: line 1: database #2 (dc=my-domain,dc=com) not configured to hold "dc=4things,dc=co,dc=za"; no database configured for that naming context
This is your problem. While dc=4things,dc=co,dc=za is in your slapd.conf, this is not used at all. This is where cn=config comes back into play. It is used instead of slapd.conf. Check how you slapd is started.
Marc
openldap-technical@openldap.org