php - Alternative to ldap_rename for Sun Directory Servers -


php provides great function copying or moving directory records within ldap. unfortunately ldap_rename function doesn't seem work on sun directory. alternatives exist change account's ou without having create new account?

my end goal have simple method switch between 2 ou's, such as: cn=username,ou=admin,dc=uaa,dc=alaska,dc=edu to
cn=username,ou=student,dc=uaa,dc=alaska,dc=edu

you can ldif. on directory point of view, job want called dn modification, there 2 ldap verbs moddn , modrdn.

it can done in ldif way in openldap:

dn: cn=username,ou=admin,dc=uaa,dc=alaska,dc=edu changetype: modrdn newrdn: cn=username deleteoldrdn: 0 newsuperior: ou=student,dc=uaa,dc=alaska,dc=edu 

i use way accros active directory :

dn: cn=username,ou=admin,dc=uaa,dc=alaska,dc=edu changetype: moddn newrdn: cn=username deleteoldrdn: 1 newsuperior: ou=student,dc=uaa,dc=alaska,dc=edu 

be careful, copy/delete different moddn , modrdn in first solution create new objects (new guid or uuid in ldap database) , can impact replication. in second solution move objects.

perhaps can find there verbs in php.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -