[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
ldapmodify with line continuations
Using either OpenLDAP 2.2.14 or 2.2.17...
I am having trouble using ldapmodify to update records when the ldif
attribute value contains line continuations. For example, piping the
following ldif into ldapmodify:
(btw, I am using add/delete rather than replace, because I often have
multi-valued fields, which I don't know how to handle w/ replace)
> changes:
> dn: uid=thjermst,ou=datatel,dc=mtholyoke,dc=edu
> changetype: modify
> add: gecos
> gecos: Tamra Hjermstad, Curriculum Support and Instructional Technology, CS
> IT, LITS
> -
> delete: gecos
> gecos: Tamra Hjermstad, Curriculum Support and Instructional Technology, CS
> IT,LITS
...errors out with
> modifying entry "uid=thjermst,ou=datatel,dc=mtholyoke,dc=edu"
> ldap_modify: Type or value exists (20)
> additional info: modify/add: gecos: value #0 already exists
(they are not the same, if you don't see it, the difference is the
additional space before LITS after the comma...)
If I reduce the length of the replacement gecos value, I get a different error:
> changes:
> dn: uid=thjermst,ou=datatel,dc=mtholyoke,dc=edu
> changetype: modify
> add: gecos
> gecos: Tamra Hjermstad, CSIT
> -
> delete: gecos
> gecos: Tamra Hjermstad, Curriculum Support and Instructional Technology, CS
> IT,LITS
> -
>
> modifying entry "uid=thjermst,ou=datatel,dc=mtholyoke,dc=edu"
> ldap_modify: No such attribute (16)
> additional info: modify/delete: gecos: no such value
If the value to be replaced and the new value contain no line
continuations, then everything works fine. The following entry piped
into ldapmodify works fine, for example.
> changes:
> dn: uid=phaas,ou=datatel,dc=mtholyoke,dc=edu
> changetype: modify
> add: gecos
> gecos: Peter A Haas, Chef Extraordinaire
> -
> delete: gecos
> gecos: Peter A Haas, Dining Services
Is this a bug w/ ldapmodify's handling of line continuations, or am I
just not understanding how to properly contruct this LDIF entry?
TIA.
(I posted this same message earlier today, but then noticed I haven't
received any messages from openldap-software since Nov 8th. I just
resubscribed. Sorry if this shows up twice..)
--
Ron Peterson
Network & Systems Manager
Mount Holyoke College
http://www.mtholyoke.edu/~rpeterso