[Date Prev][Date Next]
Re: Problem to add entries
At 10:47 AM 4/29/2005, Irene Ruscalleda wrote:
>First of all i have to say that i am a newbie in LDAP.
>I have problems to update update the entries in my directory.
>After the following command: ldapadd -x -D "cn=Manager,dc=i2cat,dc=net" -W -f /var/db/openldap-data-i2cat/entries.ldif
>I get the following message:
>ldap_add: Already exists (68)
Likely one of the two entries in this LDIF already exist.
>My ldif file looks like this:
>When i do a ldapseach i get the following output:
>ldapsearch -x -b 'dc=i2cat,dc=net' '(objectclass=*)'
># extended LDIF
># base <dc=i2cat,dc=net> with scope sub
># filter: (objectclass=*)
># requesting: ALL
># search result
>result: 0 Success
># numResponses: 2
># numEntries: 1
So, yes, the first of the entries does exist, hence the
error in trying to add it.
>As you can see there is information that doesn´t match my actual ldif file, there is old data in there and it seems it is corrupted.
>I tried to do a ldapmodify also but it seems it didn´t updated the database neither:
>ldapmodify -x -D "cn=Manager,dc=i2cat,dc=net" -W -f /var/db/openldap-data-i2cat/entries.ldif
>modifying entry "dc=i2cat,dc=net"
>modifying entry "cn=Manager,dc=i2cat,dc=net"
>ldap_modify: No such object (32)
> matched DN: dc=i2cat,dc=net
This fails because the second entry does not exist. You
need to add it first (by creating an LDIF file that just
Note that ldapmodify(1) should not be used to add entries,
unless your LDIF explicitly changes ADD changetype records.
The entry LDIF form, more commmonly used to add entries,
as you provided above, should be feed to ldapadd(1).
>Thanks in advance for any help you can give me.
>Best regards and happy weekend.