Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
    
Please go back to your old questions and accept answers where applicable. People are unlikely to help you if you don't even acknowledge their time with ticking this accept mark on the question. –  SvW Dec 8 '12 at 12:15
add comment

1 Answer

You should specify the entire objectClass chain all the way to 'top', unless you can be confident that your LDAP server will automatically insert missing base classes for you.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.