On Jul 6, 2005, at 2:09 PM, Young, Darren wrote:

I need to have a Net::LDAP script move users from one OU to another, can
this be done with a dn() call or do I need to use moddn/modrdn?

You need to use $ldap->moddn

Anyone have an example of dn() or a moddn/modrdn call?

$mesg = $ldap->moddn(
  dn     => "uid=foo, ou=People, dc=example, dc=com",
  newrdn => "uid=bar"
);

or

$mesg = $ldap->moddn(
  dn           => "uid=foo, ou=People, dc=example, dc=com",
  newsuperior  => "ou=Lemming, dc=example, dc=com",
);

Graham.


Reply via email to