1

I am trying to setup openldap in Red Hat Enterprise Linux Server 7.5 (Maipo) and trying to run this command

ldapmodify -Y EXTERNAL -H ldapi:/// -f db.ldif

which is end up with the following error

SASL/EXTERNAL authentication started SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth SASL SSF: 0 modifying entry "olcDatabase={2}hdb,cn=config"

modifying entry "olcDatabase={2}hdb,cn=config" ldap_modify: No such attribute (16) additional info: modify/delete: olcRootDN: no such attribute

here is the details of the file content

dn: olcDatabase={2}hdb,cn=config
changetype: modify
replace: olcSuffix
olcSuffix: dc=suredev20

dn: olcDatabase={2}hdb,cn=config
changetype: modify
replace: olcRootDN
olcRootDN: cn=root,dc=suredev20

dn: olcDatabase={2}hdb,cn=config
changetype: modify
replace: olcRootPW
olcRootPW: {SSHA}o8tdQw4jmCVfHyYZ92XtRlc9g+2ukjsJ

Even i tried to :set ff=unix it also not worked. Whats wrong with my setup?

Edit 1- I changed like this

dn: olcDatabase={2}hdb,cn=config
changetype: modify
replace: olcSuffix
olcSuffix: dc=suredev20

dn: olcDatabase={2}hdb,cn=config
changetype: modify
add: olcRootDN

olcRootDN: cn=root,dc=suredev20
dn: olcDatabase={2}hdb,cn=config
changetype: modify
replace: olcRootPW
olcRootPW: {SSHA}o8tdQw4jmCVfHyYZ92XtRlc9g+2ukjsJ

Now i am getting this exception

modifying entry "olcDatabase={2}hdb,cn=config" ldap_modify: Other (e.g., implementation specific) error (80) additional info: can only be set when rootdn is under suffix

1 Answer 1

2

It says olcRootDN: no such attribute, so you might just need to add it (instead of replace) :

dn: olcDatabase={2}hdb,cn=config
changetype: modify
add: olcRootDN
olcRootDN: cn=root,dc=suredev20

It will also probably be the case for olcRootPW.

6
  • Thanks for your answer can you please check edited question with changed suggest by you. Commented Nov 15, 2019 at 15:10
  • It seems you missed the last line (in your edit) olcRootDN: cn=root,dc=suredev20, otherwise it means dc=suredev20 is not a valid suffix. You can check the base domain components in your directory, this should be set according to (like dc=suredev20,dc=domain,dc=com) Commented Nov 15, 2019 at 15:44
  • This issue fixed any idea about another issue in another file.modifying entry "cn=config" ldap_modify: Other (e.g., implementation specific) error (80) Commented Nov 15, 2019 at 15:48
  • I did not see it was on the next line.. .ldif syntax takes new lines, tabs and spaces very sensitively. Commented Nov 15, 2019 at 15:50
  • So this error is coming cers.ldif file Commented Nov 15, 2019 at 15:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .