10

When modifying the Open-LDAP configuration using:

dn: olcDatabase={2}hdb,cn=config
changetype: modify
replace: olcAccess
olcAccess: {0}to *
 by dn.base="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" write
 by * none

I get the error:

ldap_modify: Other (e.g., implementation specific) error (80)
    additional info: <olcAccess> handler exited with 1
15

This is because the line continuation in the ldif file removes the first space and the attribute is considered to be: {0}to *by dn.base="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" writeby * none (which is invalid)

So, put an extra space in front of the line continuations:

dn: olcDatabase={2}hdb,cn=config
changetype: modify
replace: olcAccess
olcAccess: {0}to *
  by dn.base="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" write
  by * none
| improve this answer | |
  • 1
    Yeah, that's a sneaky one. – Magmatic Aug 1 '14 at 20:37
1

Keep in mind that this error is thrown when your olcAccess statement has other syntax problems, too. For instance, I used a keyword in one of my 'by' clauses that didn't belong there and rather than telling me "you can't use 'UID' here" it kept saying "slapd: line 0: expecting 'access' got [my DN]". The errors for this thing are obtuse.

| improve this answer | |
0

You need to create this file mod_acl.ldif with the following content with the exact format, very tricky. And use the following command:

ldapmodify -Q -Y EXTERNAL -H ldapi:/// -f mod_acl.ldif

The expecting result is:

modifying entry "olcDatabase={1}mdb,cn=config"

Content mod_acl.ldif

dn: olcDatabase={1}mdb,cn=config
replace: olcAccess
olcAccess: to attrs=userPassword,shadowLastChange,krbPrincipalKey
 by dn="cn=admin,dc=example,dc=com" write by anonymous auth by self write
 by * none
-
add: olcAccess
olcAccess: to dn.base=""
  by * read
-
add: olcAccess
olcAccess: to *
  by dn="cn=admin,dc=example,dc=com" write
  by * read

Be carefull the type of Ldap database can change depending of you implementation can be mdb, hdb or other depends of your installation.

| improve this answer | |
0

This usually happens when you copy and paste from web pages.

I sorted out such problem by following the instructions mentioned by @Mildred and also I used :set ff=unix in the Vim editor to ignore any bad formats

| improve this answer | |

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.