Hi All,

My apologies in advance if this is not the right place to ask this noob question.

I am trying to create an ldap database with base dn: dc=tr,dc=tc. Once created it will be used to store the email accounts like username@tr.tc. When I execute the command to modify the dn entry, I get the following error

root@nizam-desktop:/home/nizam/Desktop# ldapadd -f user2.ldiff -xv -D "cn=admin,dc=tr,dc=tc" -h 127.0.0.1 -w 1234
ldap_initialize( ldap://127.0.0.1 )
add objectClass:
        top
        dcObject
        organization
add dc:
        tr
        tc
add description:
        top level of the tr.tc hierarchy
adding new entry "dc=tr,dc=tc"
modify complete
ldap_add: Constraint violation (19)
        additional info: dc: multiple values provided

The user2.ldiff file looks like this:
dn: dc=tr,dc=tc
objectClass: top
objectClass: dcObject
objectClass: organization
dc: tr
dc: tc
description: top level of the tr.tc hierarchy

dn: cn=admin,dc=tr,dc=tc
objectClass: organizationalRole
cn: admin
description: LDAP Directory Administrator

dn: cn=user1,dc=tr,dc=tc
objectClass: inetOrgPerson
objectClass: inetLocalMailRecipient
cn: user1
sn: user1lastname
mail: user1@tr.tc
userPassword: 1234
mailHost: 127.0.0.1

The configuration for the database dc=tr,dc=tc is as follows (part of /etc/ldap/slapd.conf)

database    bdb
suffix        "dc=tr,dc=tc"
rootdn        "cn=admin,dc=tr,dc=tc"
rootpw        1234
directory    /var/lib/ldap/trtc
defaultaccess     read
schemacheck    on
lastmod        on
index        cn,sn,st,o            eq,pres,sub

my OS is Ubuntu 7.10 and i am running slapd installed by the synaptic manager.
root@nizam-desktop:/home/nizam/Desktop# uname -a
Linux nizam-desktop 2.6.22-14-generic #1 SMP Sun Oct 14 23:05:12 GMT 2007 i686 GNU/Linux


Can anyone please tell me why I can not add dc=tr,dc=tc?

Kind regards,
nizam

--
Nizameddin Ordulu