linuxsynchronizationredhatopenldapslapd

ldapmodify: invalid format (line 4) entry: "olcDatabase={2},cn=config"


New to Openldap (2.4.40). I am getting this error when running:

ldapmodify -a -x -H "ldaps://localhost:636" -D "cn=Manager,dc=test,dc=mydomain,dc=com" -W -f  olcsyncrepl.ldif

Error:

ldapmodify: invalid format (line 4) entry: “olcDatabase={2},cn=config”

This is the ldif file:

dn: olcDatabase={2}bdb,cn=config
olcSyncrepl: {0}rid=123
    provider=ldaps://sso.provider.com
    binddn="cn=Manager,dc=test,dc=mydomain,dc=com"
    bindmethod=simple
    credentials=mypassword
    searchbase="dc=test,dc=mydomain,dc=com"
    attrs="cn,sn,displayName,givenName,mail,uid"
    type=refreshAndPersist
    retry="10 6 60 +"

I am not sure what the problem is. Any help is appreciated.


Solution

  • I ended up adding the Syncrepl to the slapd.conf file, then re-convert it to cn=config, and it went through just fine. After making a few other changes, replication is finally working