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

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.

  • Thanks for your answer can you please check edited question with changed suggest by you. – Subodh Joshi Nov 15 '19 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) – EricLavault Nov 15 '19 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) – Subodh Joshi Nov 15 '19 at 15:48
  • I did not see it was on the next line.. .ldif syntax takes new lines, tabs and spaces very sensitively. – EricLavault Nov 15 '19 at 15:50
  • So this error is coming cers.ldif file – Subodh Joshi Nov 15 '19 at 15:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for?Browse other questions tagged or ask your own question.