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

RE: Problem using custome objectclass



Never mind...I finally found the problem.  Attribute member requires a 
different syntax for the value that I was supplying for it...doh!

Thanks

Tom

-----Original Message-----
From: Collins, Thomas W 
Sent: Friday, January 05, 2001 3:14 PM
To: openldap-software@OpenLDAP.org
Subject: Problem using custome objectclass


I have recently been charged with implementing directory services
for the company I work for.  I have been working on my schema 
definition, and am trying to create my own objectclass for use in the
schema.  I can start slapd O.K. and I can start to add entries to the
directory tree, until, that is, it encounters an entry that uses one of
my custom objectclasses.  I define my own objectclass in a file
(local.schema),
which is included in the slapd.conf file.  The contents of that file is:

objectclass ( 1.3.1.6.1.4.1.674.1 NAME 'devappmap' SUP top STRUCTURAL
		MUST ( member $ o $ ou $ cn $ l )
		MAY  ( description ) )

objectclass ( 1.3.1.6.1.4.1.674.2 NAME 'mcpactor' SUP top STRUCTURAL
		MUST ( uid $ cn $ sn $ userPassword )
		MAY  ( description ) )

I then run ldapadd using the following ldif file.  All entries are added
just fine
until it gets to an entry that uses my customized objectclass devappmap:

dn: o=DAO,dc=myco,dc=com
objectclass: dcObject
objectclass: organization
o: DAO
dc: myco

dn: cn=root,o=DAO,dc=myco,dc=com
objectclass: top
objectclass: person
cn: root
sn: root
telephoneNumber: 512-555-1212

dn: cn=root0,o=DAO,dc=myco,dc=com
objectclass: top
objectclass: person
cn: root0
sn: root

dn: cn=root1,o=DAO,dc=myco,dc=com
objectclass: top
objectclass: person
cn: root1
sn: root

dn: cn=root2,o=DAO,dc=myco,dc=com
objectclass: top
objectclass: person
cn: root2
sn: root

dn: cn=root3,o=DAO,dc=myco,dc=com
objectclass: top
objectclass: person
cn: root3
sn: root

dn: cn=Bjorn Jensen,o=DAO,dc=myco,dc=com
objectclass: top
objectclass: person
cn: "Bjorn Jensen"
sn: Jensen

dn: cn=Tom Collins,o=DAO,dc=myco,dc=com
objectclass: top
objectclass: mcpactor
uid: tcollins
cn: Tom Collins
sn: Thomas_W_Collins
userPassword: secret

dn: ou=MT12,o=DAO,dc=myco,dc=com
objectclass: top
objectclass: organizationalUnit
ou: MT12

dn: cn=AV,ou=MT12,o=DAO,dc=myco,dc=com
objectclass: top
objectclass: devappmap
member: MT12
o: DAO
ou: MT12
cn: AV
l: Line1


When ldapadd tries to add the last entry, it errors out with the following
message:

adding new entry "cn=AV,ou=MT12,o=DAO,dc=myco,dc=com"
ldap_add: Invalid syntax
	additional info: value contains invalid data

ldif_record() = 21

I am using all attributes defined in the core schema.  Can anyone see
anything
that I am doing wrong?

Thanks