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

Re: again newbie question



srgqwerty wrote:
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

You should have something like that at the top of your ldif file

dn: dc=tux,dc=org
objectClass: top
objectClass: domain
dc= tux
description: a description