[Date Prev][Date Next] [Chronological] [Thread] [Top]

OpenLDAP and schema extension

Hi all,

I ran into a problem with my first schema extension I wrote. To get some know how I've read the chapter in "Understanding and Deploying LDAP Directory Services" and checked the howto on the OpenLDAP homepage, unfortunately I still can't find the problem myself. My schema looks like this:

attributetype ( NAME 'bfhAutomountInformation'
DESC 'automount information (ie, the first arg to mount: what and where to get it)'
EQUALITY caseExactMatch
SUBSTR caseExactSubstringsMatch
ORDERING caseExactOrderingMatch

attributetype ( NAME 'bfhExportInformation'
    DESC 'options for nfs servers (the ones you find in /etc/exports)'
    EQUALITY caseExactMatch
    SUBSTR caseExactSubstringsMatch
    ORDERING caseExactOrderingMatch

# object classes
objectclass ( NAME 'bfhAutomount'
    DESC 'An entry in an automounter map'
    MAY ( cn $ uid $ bfhExportInformation $ bfhAutomountInformation )

So far so good, I can start openldap with this schema in the config file.
Now I want add an attribute bfhAutomountInformation to my user entry in openldap:

dn:cn=Gschwend Adrian [gea1],ou=ITS,ou=Staff,ou=HTI,dc=bfh,dc=ch
objectClass: top
objectClass: person
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
sn: Gschwend
cn: Gschwend Adrian [gea1]
displayName: Gschwend Adrian
givenName: Adrian
mail: adrian.gschwend@bfh.ch
uid: gea1
uidNumber: 10015
homeDirectory: /home/gea1
loginShell: /bin/bash
shadowMin: -1
shadowMax: 999999
shadowWarning: 7
shadowInactive: -1
shadowExpire: -1
shadowFlag: 0
l: Biel/Bienne
postalCode: 2501
postOfficeBox: Postfach
street: Quellgasse 21
userPassword: {Crypt}sugusbliblablo


If I add the objectclass to the entry I get this error message:

LDAP said: Object class violation
Description: You tried to perform an operation that would cause an undefined attribute to exist or that would remove a required attribute, given the current list of ObjectClasses.

I try this as Manager so I should have all rights necessary (IMHO :). In slapd logfile I find this:

slapd[96899]: conn=3 fd=12 ACCEPT from IP=::1 57253 (IP=:: 389)
slapd[96899]: conn=3 op=0 BIND dn="cn=Manager,dc=bfh,dc=ch" method=128
slapd[96899]: conn=3 op=0 BIND dn="cn=Manager,dc=bfh,dc=ch" mech=SIMPLE ssf=0
slapd[96899]: conn=3 op=0 RESULT tag=97 err=0 text=
slapd[96899]: conn=3 op=1 SRCH base="cn=Gschwend Adrian [gea1],ou=ITS,ou=Staff,ou=HTI,dc=bfh,dc=ch" scope=0 deref=0 filter="(objectClass=*)"
slapd[96899]: conn=3 op=1 SEARCH RESULT tag=101 err=0 nentries=1 text=
slapd[96899]: conn=3 op=2 MOD dn="cn=Gschwend Adrian [gea1],ou=ITS,ou=Staff,ou=HTI,dc=bfh,dc=ch"
slapd[96899]: conn=3 op=2 MOD attr=objectClass
slapd[96899]: entry failed schema check: invalid structural object class chain (inetOrgPerson/bfhAutomount)
slapd[96899]: conn=3 op=2 RESULT tag=103 err=65 text=invalid structural object class chain (inetOrgPerson/bfhAutomount)
slapd[96899]: conn=3 op=3 UNBIND
slapd[96899]: conn=3 fd=12 closed

I also changed the SUP in the objectclass to inetOrgPerson, but no luck either.

I'm running out of ideas here, google couldn't help much as this error message seems to be quite generic. Anyone got some hints for me?



Adrian Gschwend
System Administrator
Berne University of Applied Sciences
Biel, Switzerland