Questions about Debian OpenDLAP configuration

I have the slapd/stable,now 2.4.57+dfsg-3 amd64 Debian 11 package. I read the official OpenLDAP documentation and Debian article.

But I cannot understand the difference between the multiple configuration files.

I know the best practice is to use the dynamic OLC (OpenLDAP Configuration) method over the legacy slapd.conf static file.

I saw the package ships with 2 other static configuration files, they are :

  • /etc/default/slapd (can't find a doc about it)
  • /etc/ldap/ldap.conf (ldap.conf(5) which is a different doc from slapd.conf(5))

My first question is, do I have to use those static files or the OLC method is sufficient ?

Moreover, in /etc/default/slapd file, there is the SLAPD_SERVICES option, and in /etc/ldap/ldap.conf, there is URI option. Both are used to set the connection methods.

What are the differences of these options, and how do they compete ?

Thank you.


Ok I think I got it.

/etc/default/slapd configures some defaults settings related to server properties (like ports, user, group, conf location, etc.).

/etc/ldap/ldap.conf configures the OpenLDAP client.

/etc/ldap/slapd.conf configures the OpenLDAP server statically, which is obsolete by the dynamic OLC.