--On April 7, 2008 1:36:26 PM -0700 unxl3arn3r <[EMAIL PROTECTED]> wrote:
hey i am having trouble doing a moddn, all I want to do is move the object from one location to other. here is the script $ldap = new Net::LDAP('10.1.1.2', port=>389) or die $!; $ldap->bind (dn => 'cn=xxxx,cn=xx,dc=xxx,dc=xxx' , password => 'md01dg72' ); my $mesg1 = $ldap->search ( base =>"ou=Students, dc=xxx, dc=xxxx", filter => "(criteria = $user*)", ) or die ("Failed on search . $!"); $ldap_var = $mesg1->entry (0); my $DN = $ldap_var->dn; print $DN $mesg = $ldap->moddn( dn => $DN, newrdn => $ldap_var->dn, newsuperior => "ou=h, ou=Alumni, ou=Students, dc=fdu, dc=edu" , ) or warn "$! \n"; print $mesg , $mesg->error;
Moving entry locations in a tree is generally a modrdn operation, not a moddn op.
--Quanah -- Quanah Gibson-Mount Principal Software Engineer Zimbra, Inc -------------------- Zimbra :: the leader in open source messaging and collaboration