Setting up Openldap on E2 instance.
Need help with ldapmodify and setup.ldif file to modify files
My setup.ldif contained::::
dn: olcDatabase={0}config,cn=config
changetype: modify
add: olcRootPW
olcRootPW: {SSHA}BdP7KhrVpogG0RxWvy2111g0cMMSN
dn: olcDatabase={2}bdb,cn=config
changetype: modify
add: olcRootPW
olcRootPW: {SSHA}BdP7KhrVpogG0RxWvy2111g0cMMSN
replace: olcRootDN
olcRootDN: cn=superman,dc=planet,dc=org
replace: olcSuffix
olcSuffix: dc=planet,dc=org
Then on server ran
ldapmodify -a -Q -Y EXTERNAL -H ldapi:/// -f /tmp/setup.ldif
When I check below nothing got changed
/etc/openldap/slapd.d/cn=config/olcDatabase\=\{2\}hdb.ldif
Background:
slappasswd # to get {SSHA}randomstring
Started slapd service
Did the mistake of editing the olcDatabase\={2}hdb.ldif file without reading the first line to use: ldapmodify.
Still working and searching internet but any insight is appreciated.. First time posting so formatting might not be the best wrt ldif file and the extra spaces
Best Answer
In the LDIF file needed to change a reference in line for bdb to hdb: dn: olcDatabase={2}bdb,cn=config to be dn: olcDatabase={2}hdb,cn=config
Good reference is: https://www.itzgeek.com/how-tos/linux/centos-how-tos/step-step-openldap-server-configuration-centos-7-rhel-7.html
Next step to get clients servers ..