You need to populate your directory. See this for an explanation
While slapd is not running use slapadd to add the ldif containing the base dn(s) |
Quote:
So I put an ldif file in the current directory ( same directory where the slapd.conf is ), and I ran this: ./slapadd -l /usr/openldap-2.4.28/servers/slapd/s18.ldif -f slapd.conf -d -1 I get the same basic error, which is this: 4efcbbf3 slapadd startup: initiated. 4efcbbf3 backend_startup_one: starting "o=meteorregistry.com" 4efcbbf3 bdb_db_open: "o=meteorregistry.com" 4efcbbf3 bdb_db_open: database "o=meteorregistry.com": dbenv_open(/usr/openldap-2.4.28/servers/slapd/openldap-data). 4efcbbf3 bdb_db_open: database "o=meteorregistry.com": db_open(/usr/openldap-2.4.28/servers/slapd/openldap-data/id2entry.bdb) failed: No such file or directory (2). 4efcbbf3 ====> bdb_cache_release_all 4efcbbf3 backend_startup_one (type=bdb, suffix="o=meteorregistry.com"): bi_db_open failed! (2) slap_startup failed Thanks !! Floyd |
What's in s18.ldif? If there are some sensitive data, you may mask it.
Since you're migrating from another ldap server, you should export the correct ldif from it, and import the same in openldap with slapadd. You can delete everything (except DB_CONFIG) from /usr/openldap-2.4.28/servers/slapd/openldap-data before running slapadd again I guess it's not a permissions problem, as slapd can write in /usr/openldap-2.4.28/servers/slapd/openldap-data its logs and transaction data, but anyway check the permissions of that directory. Also, I don't know if oracle linux uses selinux, so check if that's the case. |
1 Attachment(s)
Quote:
I deleted all the files in the openldap-data directory except the logs directory and the DB_CONFIG. ( done this before too ) I ran this: slapadd -b "o=meteorregistry.com" -v -l s18.ldif I got back the same. [root@prod-meteor1v4 slapd]# ./slapadd -b "o=meteorregistry.com" -v -l s18.ldif 4efda633 bdb_db_open: database "o=meteorregistry.com": db_open(/usr/openldap-2.4.28/servers/slapd/openldap-data/id2entry.bdb) failed: No such file or directory (2). 4efda633 backend_startup_one (type=bdb, suffix="o=meteorregistry.com"): bi_db_open failed! (2) slap_startup failed Our ldif file is really open to all so it's ok. I just took the liberty of snipping out the encrypted ssl certs in there, and I cut out a lot of the file because it's just more of the same. It's attached. Permissions aren't a problem because right now everything is done by root. Thank you ! Floyd |
Quote:
FYI I've tried your ldif and the 1st dn was imported successfully. The rest was rejected because of invalid dn |
Quote:
I would imagine that maybe the reason the ldif doesn't work for you is because you need the special schema ? |
Quote:
Code:
sestatus Quote:
|
Quote:
So selinux is disabled. I guess that means no permission problems right ? |
1 Attachment(s)
Yup it's disabled. I cannot think of anything else that does not allow writing!
Try to use a different directory to store the data. You can use the attached slapd.conf (adjust the schemas location) and create the /tmp/data directory to store the database. It's the one I've used to test your ldif. |
Quote:
I run this to start it: ./slapd -f ./slapd-linux.conf -d -1 and I run this to kill it. kill -INT `cat /usr/local/var/run/slapd.pid` Now I will try and get it running with the script you gave me. Thanks again Bathory !! |
Quote:
It just exits and says it can't start ldap. But I can start it with this little script. #!/bin/ksh if [ $1 = "start" ] then cd /usr/openldap-2.4.28/servers/slapd nohup /usr/local/libexec/slapd -f ./slapd-linux.conf & fi if [ $1 = "stop" ] then kill -INT `cat /usr/local/var/run/slapd.pid` fi Any idea why ? Also I have a question. In your slapd.conf file you have these: suffix "o=meteorregistry.com" rootdn "cn=Manager,o=meteorregistry.com" I would like to change the rootdn to match what we have in our ldif which is this: rootdn "cn=nslcadmin,o=meteorregistry.com" Will that mess up the database if I do that ?? Thanks again !! Floyd |
Quote:
Quote:
The rootdn is used when you have to run some ldap tools that need authentication (like ldapadd). Usually it's not even present in the database. Regards |
Quote:
Quote:
You really stuck with me, and I appreciate it. Of course this is just the beginning. <grin> |
I am going to mark this as solved.
the reason I couldn't get the id2entry.bdb database made was that I needed to make a directory called "db" in the database directory. It was being pointed to by the DB_CONFIG file. After that, I was able to import my ldif with slapadd -l [ldif file] Thanks for all your help !!!!! |
All times are GMT -5. The time now is 12:17 AM. |