Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I got a problem when I adding some entries in LDAP

slapadd -l /etc/openldap/root.ldif -f slapd.conf -d 10
slapadd -l /etc/openldap/people.ldif -f slapd.conf -d 10
slapadd -l /etc/openldap/testuser.ldif -f slapd.conf -d 10

and here is the error

could not stat config file "slapd.conf": No such file or directory (2) slapadd: bad configuration file!



include         /etc/openldap/schema/core.schema
include         /etc/openldap/schema/cosine.schema
include         /etc/openldap/schema/inetorgperson.schema
include         /etc/openldap/schema/nis.schema
include     /etc/openldap/schema/eduperson.schema
include     /etc/openldap/schema/schac.schema
include     /etc/openldap/schema/iris.schema

allow bind_v2

pidfile     /var/run/openldap/
argsfile    /var/run/openldap/slapd.args

database    bdb
suffix      "dc=example,dc=com"
rootdn      "cn=admin,dc=example,dc=com"
rootpw      <secretpassword>

# The database directory MUST exist prior to running slapd AND
# should only be accessible by the slapd and slap tools.
# Mode 700 recommended.
directory   /var/lib/ldap

# Indices to maintain for this database
index objectClass                       eq,pres
index ou,cn,mail,surname,givenname      eq,pres,sub
index uidNumber,gidNumber,loginShell    eq,pres
index uid,memberUid                     eq,pres,sub
index nisMapName,nisMapEntry            eq,pres,sub
share|improve this question
also asked on stackoverflow: – glenn jackman Jul 2 '13 at 17:15
up vote 1 down vote accepted

I'm going to assume that the -f argument expects an absolute path to the file and interprets the path as relative otherwise. Are you running those commands from in /etc/openldap? Does using slapadd -l /etc/openldap/root.ldif -f /etc/openldap/slapd.conf -d 10 work? Are you running the commands as a user that can read that file?

share|improve this answer
when I run the commands from in /etc/openldap here the result bdb_monitor_db_open: monitoring disabled; configure monitor database to enable ... I run the commands from root – maged Mohammed Jul 2 '13 at 17:41
That doesn't sound like an error as much as a warning to me. Does the command fail or succeed at this point? – Etan Reisner Jul 2 '13 at 20:01
yes it's disappeared now thank you – maged Mohammed Jul 2 '13 at 20:42

Your Answer


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.