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

Re: ldapmodify with line continuations



On Sat, Nov 20, 2004 at 02:13:58PM +0100, Tony Earnshaw wrote:
> l?r, 20.11.2004 kl. 04.08 skrev Ron Peterson:
> 
> > Using either OpenLDAP 2.2.14 or 2.2.17...
> 
> [...]
> 
> > > 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
> 
> Well, it would do ... you're trying to add an entry that already exists,
> as ldapmodify is telling you. Delete first, then add, if you don't want
> to use "change".

I've tried changing the order, and it doesn't help (example below).  If
were delete/add rather than add/delete, why does my non-continued gecos
example work?

changes:
dn: uid=thjermst,ou=datatel,dc=mtholyoke,dc=edu
changetype: modify
delete: gecos
gecos: Tamra Hjermstad, Curriculum Support and Instructional Technology, CS
 IT,LITS
-
add: gecos
gecos: Tamra Hjermstad, CSIT
-

Updated record uid=thjermst,ou=datatel,dc=mtholyoke,dc=edu
modifying entry "uid=sstranfo,ou=datatel,dc=mtholyoke,dc=edu"
ldap_modify: No such attribute (16)
    additional info: modify/delete: gecos: no such value

> It will accept line continuations if you indent the second and following
> lines with a single space - this even when breaking words.

I'm doing this...

-- 
Ron Peterson
Network & Systems Manager
Mount Holyoke College
http://www.mtholyoke.edu/~rpeterso