Following RFC2849 (LDIF), it seems the multiple attributes on a single line
isn't supported.


mod-spec                 = ("add:" / "delete:" / "replace:")
                           FILL AttributeDescription SEP
                           *attrval-spec
                           "-" SEP

AttributeDescription     = AttributeType [";" options]

AttributeType            = ldap-oid / (ALPHA *(attr-type-chars))

attrval-spec             = AttributeDescription value-spec SEP

value-spec               = ":" (    FILL 0*1(SAFE-STRING) /
                                ":" FILL (BASE64-STRING) /
                                "<" FILL url)

FILL                     = *SPACE

SEP                      = (CR LF / LF)


2013/3/13 infirit <[email protected]>

> Hi, I am working through a book (Mastering OpenLDAP, Packtpub) which is
> based on openldap 2.3.
>
> The book talks in chapter 3 how to modify/add/delete attributes for a
> dn. It instructs to put the bellow in an ldif file and read it with
> ldapmodify. The writerĊ› point here is that I am supposed to add both a
> "description" and "title" without separating out the additions with a
> dash (-).
>
> It never works for me and always comes with a syntax error.
>
> non working ldif file:
> dn: uid=nicholas,ou=Users,dc=home
> changetype: modify
> add: description title # <- 2 attributes
> description: This is a test
> title: Cartesian philosopher
>
> Error: ldapmodify: wrong attributeType at line 4, entry
> "uid=nicholas,ou=Users,dc=home"
>
> The ldif file that does work is below.
>
> Working ldif file:
> dn: uid=nicholas,ou=Users,dc=home
> changetype: modify
> add: description
> description: This is a test
> -
> add: title
> title: Cartesian philosopher
>
> Now am I doing something wrong, is the book using functionality that is
> not available in openldap version 2.4 or something else?
>
> Any pointers and help much appreciated.
>
> Thx
> infirit
>


-- 
Erwann.

Reply via email to