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

Re: again newbie question






Bruno tried telling you that you are leaving the first attribute of the DN
out.  All LDIF entries need to be fixed, not just the two he listed.

# Entry for create o=tux,dc=tux,dc=org
#  wrong dn: dc=tux,dc=org
dn: o=tux,dc=tux,dc=org
objectClass: organization
o: tux

Cheers,
Kent Soper

"You don't stop playing because you grow old ...
       you grow old because you stop playing."

Linux Technology Center, Linux Security



                                                                                                                                 
                      srgqwerty                                                                                                  
                      <srgqwerty@telefonica.net        To:       Bruno Biedermann <biedermann@lyon.cemagref.fr>                  
                      >                                cc:       openldap-software@OpenLDAP.org                                  
                      Sent by:                         Subject:  Re: again newbie question                                       
                      owner-openldap-software@O                                                                                  
                      penLDAP.org                                                                                                
                                                                                                                                 
                                                                                                                                 
                      08/21/2003 08:17 PM                                                                                        
                                                                                                                                 
                                                                                                                                 




Bruno Biedermann wrote:
      srgqwerty wrote:
            I pretend to do the following:

            dc=tux,dc=org is the root
            o=tux,dc=tux,dc=org is CHILD OF dc=tux,dc=org
            ou=sels,o=tux,dc=tux,dc=org is CHILD OF o=tux,dc=tux,dc=org
            ou=mai,o=tux,dc=tux,dc=org is CHILD OF o=tux,dc=tux,dc=org

            In other words, "sels" and "mai" are both in the same level and
            BOTH OF THEM have a parent O=TUX

            I have the following struct.ldif file:

            # ----- BEGIN OF LDIFF FILE -----
            # Entry for create o=tux,dc=tux,dc=org
            dn: dc=tux,dc=org
            objectClass: organization
            o: tux

            # Entry for create ou=sels,o=tux,dc=tux,dc=org
            dn: o=tux,dc=tux,dc=org
            objectClass: organizationalunit
            ou: sels

            # Entry for create ou=mai,o=tux,dc=tux,dc=org
            dn: o=tux,dc=tux,dc=org
            objectClass: organizationalunit
            ou: mai
            # ----- END OF LDIFF FILE -----

            But when I run the following commands an error occur (ldap_add:
            Already exists) and the entry ou=mai,o=tux,dc=tux,dc=org is not
            added.

            [root@this tux_entries]# ldapadd -x -D
            'cn=Manager,dc=advr,dc=org' -w blablabla -f struct.ldif
            adding new entry "dc=tux,dc=org"

            adding new entry "o=tux,dc=tux,dc=org"

            adding new entry "o=tux,dc=tux,dc=org"
            ldap_add: Already exists

            ldif_record() = 68

            [root@this tux_entries]# ldapsearch -b 'dc=tux,dc=org'
            'objectclass=*'
            dc=tux,dc=org
            objectClass=organization
            o=tux

            o=tux,dc=tux,dc=org
            objectClass=organizationalunit
            ou=sels
            2 matches
            [root@fwall1 advr_entries]#

            What am I doing wrong?

            Thanks



      Hi!

      This should be

      # Entry for create ou=sels,o=tux,dc=tux,dc=org
      dn: ou=sels,o=tux,dc=tux,dc=org
      objectClass: organizationalunit
      ou: sels

      # Entry for create ou=mai,o=tux,dc=tux,dc=org
      dn: ou=mai,o=tux,dc=tux,dc=org
      objectClass: organizationalunit
      ou: mai
If I modify mu ldif file like this:

# Entry for create o=tux,dc=tux,dc=org
dn: dc=tux,dc=org
objectClass: organization
o: tux

# Entry for create ou=sels,o=tux,dc=tux,dc=org
dn: ou=sels,o=tux,dc=tux,dc=org
objectClass: organizationalunit
ou: sels

# Entry for create ou=mai,o=tux,dc=tux,dc=org
dn: ou=mai,o=tux,dc=tux,dc=org
objectClass: organizationalunit
ou: mai

The message when I run ldapadd is:
        ldap_add: No such object
            matched DN: "dc=tux,dc=org"
            additional info: parent does not exist

Any ideas?

Thanks