I have two berkeley dbs installed on the RHEL 5.3. Now, I am confused that which one openldap is referring as its backend.
Following is the slapd.conf:
include /usr/local/etc/openldap2-4-30/schema/core.schema
include /usr/local/etc/openldap2-4-30/schema/cosine.schema
include /usr/local/etc/openldap2-4-30/schema/inetorgperson.schema
**# Define global ACLs to disable default read access.**
**# Do not enable referrals until AFTER you have a working directory**
**# service AND an understanding of referrals.**
pidfile /usr/local/var/openldap2-4-30/run/slapd.pid
argsfile /usr/local/var/openldap2-4-30/run/slapd.args
**# rootdn can always read and write EVERYTHING!**
access to *
by self write
by * read
#########################################
**# uniquely identifies this server**
#########################################
serverID 1
#######################################################################
**# BDB database definitions**
#######################################################################
database bdb
suffix "dc=COMPANY,dc=CP"
rootdn "cn=Manager,dc=COMPANY,dc=CP"
**# Cleartext passwords, especially for the rootdn, should**
**# be avoid. See slappasswd(8) and slapd.conf(5) for details.**
**# Use of strong authentication encouraged.**
rootpw secret
**# The database directory MUST exist prior to running slapd AND**
**# should only be accessible by the slapd and slap tools.**
**# Mode 700 recommended.**
directory /usr/local/var/openldap2-4-30/Master1/openldap-data
Please guide how can i know that out of which installed berkeley dbs, openldap is using as its backend?
Note: this question is linked to
Thanking you.
It looks like you should only have 1 root there, each new root contains a
type block.
Have you initialized the new root?
I think you need to create a new root ldif file, and import those entries into the running LDAP server like so;
and then import that into the empty LDAP server like so;
There is a tutorial on setting up new roots here;
http://www.howtoforge.com/linux_openldap_setup_server_client
and some more details on what you need in the minimal root here;
http://www.openldap.org/doc/admin22/dbtools.html
The database OpenLDAP is using is located at
/usr/local/var/openldap2-4-30/Master1/openldap-data
.How about:
?
It seems you have been mixing several sources (both information and software....) while you've been wrestling with OpenLDAP. My recommendation: start over from scratch.
For starters, if you
yum install openldap-servers
, you absolutely DO NOT need to download any BDB libraries from the net, everything is set for you.Secondly, the "standard" path for OpenLDAP data files is
/var/lib/ldap
. Normally you should not care about that, you createLDIF
files with the text editor of your choice and then useslapadd
command to create those LDAP trees. After that, use standard LDAP utilities such asLuma
,gq
,ldapsearch/ldapadd/ldapremove
or your favourite programming language LDAP bindings.Here's an excellent on-line book about (Open)LDAP, don't get scared by the title.