Chris,
  Two things might be an issue.  First (and less likely) check to see that you
are binding as an account with sufficient priveleges to delete users.  The more
probable thing is that you are choking the server by sending too many requests
at nearly the same time.  First, try just exiting after
  $ldap->delete($entry->dn( ) );
If that works, try putting a 1 second pause after the same.
  --Jim

On Mon, 29 Dec 2003, Chris Blaine wrote:

> I am trying to use the NET::LDAP module in perl to delete all dn's from a
> search.  After getting the search results, I go in with this piece of code;
>
> foreach $entry($msg1->all_entries())  {
> $dn = $entry->dn( );
> print "Deleting ".$dn."\n";
> $ldap->delete($entry->dn( ) );
> }
>
> It appears to work as promised, however, it leaves my ldap server in need of
> a restart in order to service and queries, and upon restart, the dn's that I
> wanted deleted have not been changed.
>
> I am running Red Hat Enterprise Linux 3.0 for the ldap server with openldap
> 2.0.27-11 from red hat.
>
> Any help would be most appreciated.
> Thanks
> Chris Blaine
>
>

Reply via email to