objectClass in openldap.

Posted by garden air on Server Fault See other posts from Server Fault or by garden air
Published on 2012-12-08T12:10:02Z Indexed on 2012/12/10 5:08 UTC
Read the original article Hit count: 364

Filed under:

I am working on openldap in my linux box (centos) as testing.I create a base file to discuss with you about objectClass functionality & its impact if we not write.I write objectClass two times i.e top and domain .What does it mean ? The 2nd one is drived from the firect objectClass like parents child relation ?

[root@srv1 openldap]# vim base.ldif 
base.ldif 
dn: dc=test,dc=local 
dc: test 
objectClass: top 
objectClass: domain 

Now I create add two OUs and does not add objectClass:top in both sales and marketing.

To add two OUs i.e Sales and Marketing

dn: ou=Sales,dc=test,dc=local 
ou: Sales 
objectClass:organizationalUnit 

dn: ou=Marketing,dc=test,dc=local 
ou: Marketing 
objectClass: organizationalUnit 

The confusion is should use all the parent objectClass and chield objectClass ? If we not add what impact will be on the structure ? In the following I use objectClass top and organizationalunit

dn: ou=Sales,dc=test,dc=local 
ou: Sales 
objectClass: top 
objectClass:organizationalUnit 


dn: ou=Marketing,dc=test,dc=local 
ou: Marketing 
objectClass: top 
objectClass: organizationalUnit 

Please guide me which one is correct ?

thanks garden

© Server Fault or respective owner

Related posts about openldap