Greg Martin wrote:
I read this in man slapd-config: "Assuming the above data was saved in a file named "config.ldif" and the /etc/openldap/slapd.d directory has been created, this command will initialize the configuration: slapadd -F /etc/openldap/slapd.d -n 0 -l config.ldif" and:
"Alternatively, an existing slapd.conf file can be converted to the new format using slapd or any of the slap tools: slaptest -f /etc/openldap/slapd.conf -F ETCDIR/slapd.d"
From reading that it looks as if this is a two-step process.
That is not what the word "Alternatively" means.
- to
convert slapd.conf to ./slapd.d, and the second to "initialize" it. Since slapadd is used to add things to the database, I figured it was being imported into the database. Is the slappadd not necessary?
If you have a plain LDIF file produced by slapcat'ing a database, you can slapadd it to use it.
A slapd.d directory tree produced by converting a slapd.conf file is not a flat LDIF file, it's a tree of related files. It is in fact an LDAP database that uses a hierarchical filesystem as its underlying data store. Since it is an actual LDAP database, slapd reads it directly.