On Wed, 21 Mar 2012 22:32:33 -0400, btb@bitrate.net wrote:
i'd amend that process slightly:
Not quite there yet...
Make a habit of always running the slap tools as the user & group slapd runs as, so you'll never screw up file ownerships for slapd. I.e. slapd -u ldap vs su ldap -c 'slapcat'.
- stop slapd
1.5. su ldap Might as well do umask 0077 while you are at it.
- slapcat -b 'cn=config' -l config.ldif
- mv slapd.d slapd.d.bak
- mkdir slapd.d
- edit ldif as desired
- slapadd -n 0 -F slapd.d/ -l config.ldif
- slaptest -F slapd.d/
8. exit # from 'su'
- start slapd
I.e. slapd -u ldap -F /whatever/slapd.d/
the order of a few of the steps could vary slightly depending on personal preference, and technically, slapd doesn't necessarily have to be stopped so early on, but for the sake of those to which this topic applies, it keeps things simple.