[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: ldapmodify: multiple additions
- To: infirit <infirit@gmail.com>
- Subject: Re: ldapmodify: multiple additions
- From: Philip Guenther <guenther+ldaptech@sendmail.com>
- Date: Wed, 13 Mar 2013 10:35:08 -0700
- Cc: openldap-technical@openldap.org
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=sendmail.com; s=tls.dkim; t=1363196111; bh=5cEgv1zuHrtPSN+bF8hjzRa0eh+A8eLFCOlk7TM0Z9I=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=djE+jT1JBjeYRuP/NC+SBdEp0R0HGhQTp0qdE7DM+mc5IbZt7GRyfUW8bKqnflR27 lsHC+IVFF2HPjlaefyfoZCuulRQcbxK6W2/6UMQsU4W6u31TOav0jBJgBq6D6bPNCx RooqlvfI0kNgjUAELaXuqUcl0Dc83Nl7Mv41d56U=
- In-reply-to: <5140AD38.3080009@gmail.com>
- References: <5140AD38.3080009@gmail.com>
- User-agent: Alpine 2.03 (BSO 1266 2009-07-14)
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