On Wed, 13 Mar 2013, infirit wrote:
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?
The non-working syntax doesn't work because it doesn't match the syntax specified in RFC 2849. It *looks* kinda like LDIF, but it really isn't. You should contact the book author so they can fix it for a future printing.
Philip Guenther