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

Re: Building an LDAP database "for dummies"



Howard Chu wrote:

So - "What is this tree?" - the tree is the structure you design to contain the data you're going to store. Schema is just a description of what kinds of data will be recognized by the server, but it doesn't say anything about the location of the data. The tree structure gives you the location.

But WHERE is this structure I design? Is it the statements in my LDIF file? Is it in slapd.conf? That file includes a suffix statement and some include statements for schema files. Is the schema the definition of the hierarchy?


I understand the concept of hierarchy. Do I have to define everything up to the entire universe? There is an "objectClass: top" statement that should allow me to stop at some lower level.

My hierarchy is:

 This database
         Users with attributes such as email address, phone number, etc.

My suffix statement (organization is the top of my hierarchy):
suffix o=MyOrg

My LDIF (just one user entry):

dn: o=MyOrg
objectclass: top
objectclass: person
objectclass: organization
o: MyOrg

dn: cn=A User,o=MyOrg
objectclass: top
objectclass: person
objectclass: organization
givenName: A
sn: User
cn: A User
mail: auser@hotmail.com
o: MyOrg

I run:

ldapadd -v -f /home/jont/ldap/myaddr.ldif -h thispc -p 389 -x

result:

add objectclass:
	top
	person
	organization
add o:
	MyOrg
adding new entry "o=MyOrg"
ldap_add: No such object

It would help if the error message stated WHICH object doesn't exist.