# Cannnot start slapd

## lelik

```
/etc/openldap/slapd.conf

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/samba.schema

pidfile   /var/run/openldap/slapd.pid

argsfile /var/run/openldap/slapd.args

# Load dynamic backend modules:

# modulepath   /usr/lib/openldap/openldap

# moduleload   back_shell.so

# moduleload   back_relay.so

# moduleload   back_perl.so

# moduleload   back_passwd.so

# moduleload   back_null.so

# moduleload   back_monitor.so

# moduleload   back_meta.so

# moduleload   back_hdb.so

# moduleload   back_dnssrv.so

database   ldbm

suffix      "dc=POLO"

rootdn      "cn=Manager,dc=POLO"

rootpw      {MD5}s+JROT6YmCR/KFfL3N9o4w==

directory /var/lib/openldap-ldbm 

# Indices to maintain

index    sambaSID    eq

index    sambaPrimaryGroupSID    eq

index    sambaDomainName    eq

index objectClass,uid,uidNumber,gidNumber,memberUid eq

index cn,mail,surname,givenname   eq,subinitial

#Loglevel is set to 256 initially, this will give you some good hints when debugging problems.

loglevel 256
```

```
/etc/openldap/ldap.conf

HOST    127.0.0.1

BASE    dc=POLO
```

```
slaptest -d 10

WARNING: No dynamic config support for database ldbm.

config file testing succeeded
```

```
/etc/init.d/slapd start

* Starting ldap-server ...                                                                                    [ !! ]
```

```
slapcat -d 255

slapcat shutdown: initiated

ldbm backend syncing

ldbm flushing db (id2entry.dbb)

ldbm closing db (id2entry.dbb)

ldbm backend done syncing

====> cache_release_all

slapcat destroy: freeing system resources.
```

directory /var/lib/openldap-ldbm has 2 files: alock  and id2entry.dbb. Both belong to ldap:ldap

----------

## di1bert

I'd start by checking the permissions on your /var/lib/openldap-data directory.

-m

----------

## lelik

Thanks, but I believe permissions are Ok.

As stated in my initial post /var/lib/openldap-ldbm has 2 files: alock and id2entry.dbb. Folder and both files belong to ldap:ldap.

----------

## neonknight

Try

```
moduleload    back_ldbm.la
```

or else set the database format to bdb

Maybe that works...

----------

## lelik

bdb does not work either.

```
slapcat -d 255
```

```
slapcat startup: initiated.

backend_startup_one: starting "dc=POLO"

bdb_db_open: dc=POLO

bdb_db_open: dbenv_open(/var/lib/openldap-data)

bdb_db_open: db_open(/var/lib/openldap-data/id2entry.bdb) failed: No such file or directory (2)

====> bdb_cache_release_all

bdb(dc=POLITBURO): Unknown locker ID: 0

backend_startup_one: bi_db_open failed! (2)

slap_startup failed
```

```
ls /var/lib/openldap-data/*
```

gives me following files in /var/lib/openldap-data/

```

/var/lib/openldap-data/DB_CONFIG  /var/lib/openldap-data/__db.004

/var/lib/openldap-data/__db.001   /var/lib/openldap-data/__db.005

/var/lib/openldap-data/__db.002   /var/lib/openldap-data/alock

/var/lib/openldap-data/__db.003   /var/lib/openldap-data/log.0000000001
```

But not id2entry.bdb

At what point id2entry.bdb is supposed to be created   :Question: 

----------

## mescall2000

 *lelik wrote:*   

> 
> 
> bdb_db_open: db_open(/var/lib/openldap-data/id2entry.bdb) failed: No such file or directory (2)
> 
> 

 

I solved launching the daemon by hand

/usr/lib64/openldap/slapd -f /etc/openldap/slapd.conf -d 255

----------

