[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: ldapmodify with line continuations
lør, 20.11.2004 kl. 14.47 skrev Ron Peterson:
[...]
> > > > 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?
No idea (I tried it first, before posting ).
I usually use awk, GQ or shell for this kind of thing (in your
particular case I used my-own-compiled ldapmodify out of Openldap
2.2.18 on RHAS3 - my own Openldap etc. stuff).
Here's the ldapmodify ldif I used to change Billy's gecos:
dn: cn=billy,ou=people,ou=groups,dc=billy,dc=demon,dc=nl
changetype: modify
delete: gecos
-
add: gecos
gecos: Da Cat Billy
(He was Billy da Cat). "It just worked".
Moreover, I've used precisely the same method to change 1500+ uid's
userPassword entries from "wachtwoord" to 'apg -n1' for random
passwords. Hope this don't lead to no flame about using apg's default to
generate random passwords.
[...]
--Tonni
--
The bottom line is, that after setting the cart among the pigeons, at the
end of the day I can see the carrot at the end of the tunnel
mail: tonye@billy.demon.nl
http://www.billy.demon.nl
They love us, don't they, They feed us, won't they ...