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

Re: OpenLDAP-2.0.7: "ldap_add: No such object" -- PLEASE HELP!!!

Well, like it says, dn: dc=mycompany, dc=com probably already exists. The
error message is complaining that the directory already contains an entry
with the dn dc=mycompany, dc=com. It is not complaining about the attributes
under that enrty. Removing the o and l attributes under that dn aren't going
to change the fact that it already exists.

If you do an ldapsearch, does it get listed? --

ldapsearch -x -b'dc=mycompany, dc=com' 'objectclass=*'

If it exists, than take it out of your ldif and use ldapadd to add the other
entrie. If it exists and you want to change it, you'll need to use the
ldapmodify command.

Or, you may just want to make a fresh start of it - stop slapd, remove all
the files in the database directory and start slapd again.

> From: "Alex Kamalov" <alexk@icnt.net>
> Date: Mon, 23 Apr 2001 11:01:45 -0400
> To: <openldap-software@OpenLDAP.org>
> Subject: Re: OpenLDAP-2.0.7: "ldap_add: No such object" -- PLEASE HELP!!!
> David, Stephane. I have fixed what you have pointed out to me. No more "No
> such object" error. However, this time I've received "ldap_add: already
> exists" message. It is pasted below. Also I am attaching a modified version
> of test.ldif file. As per David's instruction I removed c=US altogether. I
> also tried and tested by removing 'o:' option as well as 'l:' option but I
> am getting the same error about redundant entry. Again, Thank You guys for
> helping me.
> Alex
> Enter LDAP Password:
> add o:
> mycompany
> add l:
> new york
> add objectclass:
> organization
> adding new entry "dc=mycompany, dc=com"
> ldap_add: Already exists
> ldif_record() = 68
> Here is my test.ldif file:
> dn: dc=mycompany, dc=com
> o:mycompany
> l:new york
> objectclass: organization
> dn: ou=IT, dc=mycompany, dc=com
> ou: IT objectclass: organizationalunit
> dn: ou=ACCOUNTING, dc=mycompany, dc=com
> objectclass: organizationalunit
> dn: ou=MANAGEMENT, dc=mycompany, dc=com
> objectclass: organizationalunit
> dn: ou=CLIENTS, dc=mycompany, dc=com
> objectclass: organizationalunit
> dn: ou=OFFICE, dc=mycompany, dc=com
> ou: OFFICE
> objectclass: organizationalunit
> dn: ou=EMPLOYESS, dc=mycompany, dc=com
> objectclass: organizationalunit
> dn: cn=Mr.Peepers, ou=Friends, dc=mycompany, dc=com
> cn: Mr.Peepers
> sn: mycompany
> mail: mrpeepers@mycompany.com
> objectclass: person
> dn: cn=Linus Torvalds, ou=Friends, dc=mycompany, dc=com
> cn: Linus Torvalds
> sn: Linus
> mail: test@address.com
> objectclass: person