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

Re: Newbie: can't populate LDAP database



On Thu, Apr 03, 2003 at 05:31:02PM +0200, Alexei Monastyrnyi wrote:

> Trying to add entry in LDAP database with ldapadd command I can see lines
> er:updater# ldapadd -x -D "cn=Manager,dc=orcsoftware,dc=com" -W -f
> test2.ldif
> Enter LDAP Password:
> adding new entry "cn=Barbara J Jensen,dc=orcsoftware,dc=com"
> ldapadd: update failed: cn=Barbara J Jensen,dc=orcsoftware,dc=com
> ldap_add: No such object (32)
> 
> er:updater# cat test2.ldif
> dn: cn=Barbara J Jensen,dc=orcsoftware,dc=com
> cn: Barbara J Jensen
> cn: Babs Jensen
> objectClass: person
> sn: Jensen

You must create dc=orcsoftware,dc=com before you can put any entries
inside it. Try putting something like this at the very top of your
LDIF file:

dn: dc=orcsoftware,dc=com
objectclass: dcObject
objectclass: organization
o: Orc Software
dc: orcsoftware

> Have different error codes with more complex entry, like this
> er:updater# ldapadd -x -D "cn=Manager,dc=orcsoftware,dc=com" -W -f erik
> Enter LDAP Password:
> adding new entry "uid=erik,ou=People,dc=orcsoftware,dc=com"
> ldapadd: update failed: uid=erik,ou=People,dc=orcsoftware,dc=com
> ldap_add: Object class violation (65)
>         additional info: invalid structural object class chain
> (inetOrgPerson/ac
> count)

That is an FAQ. As it happens, I posted an answer for it yesterday:

	http://www.openldap.org/faq/data/cache/883.html

Andrew
-- 
-----------------------------------------------------------------------
|                 From Andrew Findlay, Skills 1st Ltd                 |
| Consultant in large-scale systems, networks, and directory services |
|     http://www.skills-1st.co.uk/                +44 1628 782565     |
-----------------------------------------------------------------------