Though clearly mentioned, the following had me in spin for a good 10 minutes.
Ensure:
if (!ldap_set_option($conn, LDAP_OPT_PROTOCOL_VERSION, 3)) {
// do something horrible
}
has been set _before_ you actually bind :)
![]() |
|
||||||||||
|
ldap_renameDescriptionbool ldap_rename ( resource link_identifier, string dn, string newrdn, string newparent, bool deleteoldrdn )
The entry specified by
ldap_rename
backports at gmail dot com
15-Jun-2007 07:26
Though clearly mentioned, the following had me in spin for a good 10 minutes.
hyc at openldap dot org
06-Oct-2005 04:49
Contrary to Richard Esplin's statement, this *is* the correct function to use for renaming subtrees and moving entries from one place in the tree to another. Just that most LDAP server implementations don't support moving non-leaf entries.
venakis at ccf dot auth dot gr
18-Oct-2004 02:52
If you are using Sun Directory Server 5.2, please note that you can't use ldap_rename to move an entry. According to Sun's own documentation: "[...] At this point in time, Directory Server does not support the ability to use the modify DN operation to move an entry from one location in the directory tree to another location." (http://docs.sun.com/source/817-6707/resultcodes.html)
cory at shopwithafriend dot net
12-Aug-2004 03:21
When setting a new Rdn value be sure to escape any commas that are not path designators. I spent several hours trying to move user nodes in AD since their cn was set wrong. We wanted the cn to be set to: lastname, firstname.
Viper_SB at NOSPAMyahoo dot com
30-Jun-2004 02:41
Since this function isn't documented to well I thought I'd help out those trying to get this to work.
Richard Esplin
15-Nov-2003 06:37
ldap_rename can only move leaf nodes of the directory tree. If your ldap entry has any child entries, then ldap_rename is not the tool that you need. We needed to change usernames, but that alters the dn. ldap_rename wouldn't work because each of our user ldap entries has a couple associated child entries. We had to write a function to recursively copy the subtree to the new location, and then delete the original version. Here is the basic algorithm:
alex at netflex dot nl
16-Oct-2002 08:29
Works also with eDirectory 8 (NW6).
04-Apr-2002 03:10
To get this function working make sure that the value for $newrdn is relative.
|