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

Re: modify DNs in PHP



At 11:16 AM 12/19/00 +0100, Tomas Kucera wrote:
>hi,
>does anybody know how to change DNs to another one?

LDAPv3 offers the Modify DN operation.
LDAPv2 offers the more restrictive Modify RDN operation.

>I have this dn:
>
>cn=john,ou=marketing,dc=company,dc=country
>
>and I would change it to:
>
>cn=john,ou=support,dc=company,dc=country

This would require the LDAPv3 Modify DN (and the existence
of the new superior).  (In LDAPv2, you would have to use
add/delete operations instead).

>but when I dont know how to do it in php
>there is a function ldap_modify but its seems to work only with common
>attributes.

I am not familiar with the PHP API, but I suggest looking for
routines named ldap_moddn*, ldap_rename*, or ldap_modrdn*.
Note that if the routine does not have a new superior parameter,
it likely doesn't support the full LDAPv3 Modify DN functionality.

Kurt