[turba] Re: Special character handling bug in LDAP addressbooks

Scott Courtney courtney at 4th.com
Fri Jun 13 07:11:23 PDT 2003


On Friday 13 June 2003 08:27, you wrote:
> Scott Courtney wrote:
> > dropping the "(Work)" part. But OpenLDAP (and probably some other LDAP
> > servers) will not actually allow you to change the DN of an existing
> > entry.
>
> This is wrong.  Changing the DN (at least the first component) _is_
> possible using the "modrdn" LDAP operation.  From the command line one
> uses "ldapmodrdn".  In PHP it's something like "ldap_moddn".
> HTH,
> John

I'll be darned! There's actually a comment on the PHP annotated manual to the
effect that this wasn't possible, and like a fool I believed it. Your note
prompted me to go sniffing around a little more carefully, and you're
absolutely right!

The function is ldap_rename(). It's a recent addition, so perhaps it was
added after that user submitted the annotation.

In any case, this will do the trick for me.

That being said, I can verify that Turba does *not* change the DN when that
attribute changes, at least not in my testing case. So apparently this
ldap_rename() function isn't being called in that case.

Thanks for a great tip, though!

Scott

-- 
-----------------------+------------------------------------------------------
Scott Courtney         | "I don't mind Microsoft making money. I mind them
courtney at 4th.com       | having a bad operating system."    -- Linus Torvalds
http://4th.com/        | ("The Rebel Code," NY Times, 21 February 1999)
                       | PGP Public Key at http://4th.com/keys/courtney.pubkey



More information about the turba mailing list