# FreeBSD 12 - OpenLDAP: WARNING: failed precmd routine for slapd



## marplan72 (Feb 23, 2020)

Hi

I tried to start OpenLDAP:

```
/usr/local/etc/rc.d/slapd: WARNING: failed precmd routine for slapd
```

Using:
FreeBSD 12.1-RELEASE-p2 FreeBSD 12.1-RELEASE-p2 GENERIC  amd64

Any idea?

Best regards


----------



## SirDice (Feb 24, 2020)

Did you configure it? Read `pkg info -D openldap24-server`.


----------



## marplan72 (Feb 26, 2020)

SirDice said:


> pkg info -D openldap24-server



Before my post was published, I did re-install OpenLDAP using ports instead pkg and now, it works!
_
 pkg info -D openldap-server
openldap-server-2.4.49_1:
On install:
The OpenLDAP server package has been successfully installed._

Thanks for your response.
Best regards


----------



## manilaboy1vic (Feb 12, 2021)

I ran into the same issue.

The configuration file is quite sensitive.  All I did to resolve the issue is make sure the configuration file was lined up with the statements that were there already.

The following will cause an error when trying to run the service.


```
# Load dynamic backend modules:
modulepath      /usr/local/libexec/openldap
 moduleload     back_mdb
 moduleload     back_ldap
```

Soon as I changed it to look like the following it started up no problem:


```
# Load dynamic backend modules:
modulepath      /usr/local/libexec/openldap
moduleload      back_mdb
moduleload      back_ldap
```


----------

