0

I can successfully start slapd on FreeBSD 11 perfectly fine, but it won't run on startup. Here is what I put in my rc.conf:

slapd_enable="YES"
slapd_flags="-h "ldap://1.2.3.4/ ldapi://%2fvar%2frun%2fopenldap%2fldapi/""
slapd_sockets="/var/run/openldap/ldapi"

1.2.3.4 is replaced with my actual public IP.

I have tried many permutations of the valid options for slapd_flags and slapd_sockets, but every time I reboot slapd is not running.

How do I ensure slapd runs at system startup?

3

I didn't post this until I had searched for days, and I just now found the answer. If no one else finds this useful, I'll end up deleting, but here it is:

https://forums.freebsd.org/threads/58365/

Basically, if networking isn't up yet, then it cannot bind and will fail. The solution is to edit /usr/local/etc/rc.d/slapd and change this line:

# REQUIRE: FILESYSTEMS ldconfig

To:

# REQUIRE: FILESYSTEMS ldconfig NETWORKING

This ensures networking is loaded prior to attempting to start slapd.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.