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

Re: ldapadd: Invalid syntax (21)



On Thu, Apr 23, 2009 at 05:43:34PM +0200, François Mehault wrote:

> Enter LDAP Password:
> adding new entry "dc=toto,dc=fr"
> ldapadd: Invalid syntax (21)
>         additional info: objectClass: value #1 invalid per syntax

So the first value of the objectClass attribute is bad.

> The content of my test.ldif :
> 
> dn: dc=toto,dc=fr
> objectClass: dcObject
> objectClass: organizationUnitName
> ou: test
> dc: toto

> Why I can't add my ldif ? If someone can help me, thanks
> 
> If I put organisation instead of organisationalUnit in my ldif, it works ! (and o instead ou of course)

In the LDIF you quote, the value giving trouble is probably
'organizationUnitName' - it should be:
'organizationalUnit'

Note the American spelling (z not s), and the fact that the objectclass
defines the type. 'organizationalUnitName' is an attribute name, and is
usually expressed as 'ou' in any case.

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     |
-----------------------------------------------------------------------