-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 hi
what is the best practice to moddn() for branch of objects? lets say we have two objects: - ---[ user A start ]------------------------------------------- dn: uid=naf.nafus,ou=People,dc=umidb dn: [email protected],uid=naf.nafus,ou=People,dc=umidb dn: [email protected],[email protected],uid=naf.nafus,ou=People,dc=umidb dn: [email protected],uid=naf.nafus,ou=People,dc=umidb dn: cn=dev-ap-notebook,[email protected],uid=naf.nafus,ou=People,dc=umidb dn: [email protected],uid=naf.nafus,ou=People,dc=umidb dn: [email protected],[email protected],uid=naf.nafus,ou=People,dc=umidb dn: [email protected],uid=naf.nafus,ou=People,dc=umidb dn: [email protected],[email protected],uid=naf.nafus,ou=People,dc=umidb - ---[ user A end ]------------------------------------------- and - ---[ user B start ]------------------------------------------- dn: uid=taf.taffij,ou=People,dc=umidb - ---[ user B end ]------------------------------------------- now, I want to „reassign“ user A branch (and all of it's leaves) to user B - ---[ user A branch to reassign start ]------------------------------------------- dn: [email protected],uid=naf.nafus,ou=People,dc=umidb dn: [email protected],[email protected],uid=naf.nafus,ou=People,dc=umidb - ---[ user A branch to reassign end ]------------------------------------------- so, user B becomes - ---[ „new“ user B start ]------------------------------------------- dn: uid=taf.taffij,ou=People,dc=umidb dn: [email protected],uid=taf.taffij,ou=People,dc=umidb dn: [email protected],[email protected],uid=taf.taffij,ou=People,dc=umidb - ---[ „new“ user B end ]------------------------------------------- to do that, I take target branch subtree and „re-write“ DN of each object to be reassigned ... (https://github.com/z-eos/umi/blob/master/lib/LDAP_CRUD.pm#L992) what I think of is something like this: - ---[ quotation start ]------------------------------------------- $dn = '[email protected],uid=naf.nafus,ou=People,dc=umidb'; $mesg = $ldap->moddn( $dn, newsuperior => 'uid=taf.taffij,ou=People,dc=umidb', recursively => 1 ); - ---[ quotation end ]------------------------------------------- - -- Zeus V. Panchenko jid:[email protected] IT Dpt., I.B.S. LLC GMT+2 (EET) -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQQYIXL6FUmD7SUfqoOveOk+D/ejKgUCWyeYpwAKCRCveOk+D/ej KrMyAJ9pkQ5HzEX1iIGBI8WNJDKpKEMiOgCg1UtQBvbNIwuPEZAMIyutWi5E690= =S2qO -----END PGP SIGNATURE-----
