Thanks for your inputs, so far; 1.) I am binding as the administrator with full rights according to my slapd.conf. 2.) This works for only a single entry, any more than that it "halts" the ldap server, even with a 1 second delay. I tried it with 5 results, then with 3, still no dice.
Basically I am trying to update my local ldap server with information from another ldap server, however I am not allowed to hold the same schema information, and as such have to pull in their data, modify their dn's, and cut out a bunch of their schema specific information. I have automated this process with scripting, and I am trying to come up with a way to script my "updates". Right now, when I want to do an update, I get their info, then go into my ldap db directory, stop ldap, wipe the database, and build it new from ldif. Is there a better way? Here is the script I am running minus the bind; 32 $msg1 = $ldap->search( 33 base => "ou=, dc=, dc=", 34 scope => "sub", 35 filter => "(sn=in*)"); 36 foreach $entry($msg1->all_entries()) { 37 $dn = $entry->dn( ); 38 print "Deleting ".$dn."\n"; 39 $result = $ldap->delete($entry->dn( ) ); 40 die $result->error( ) if $result->code( ); 41 sleep 1; 42 } Adding the $result, allows me to see "DN index delete failed at script.pl line 40, <DATA> line 283." Thanks Chris "Chris Ridd" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On 29/12/03 3:09 pm, Jim Harle <[EMAIL PROTECTED]> wrote: > > > 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. > > In fact it might be sensible to wait for a result code after doing each > delete. It'll slow down the client, but might avoid locking the server up! > > You will need to make sure that you don't try to delete parent entries > before child entries, if your search happens to return both parents and > children. You also cannot rely on the order in which the results are > returned, so you may want to do some sorting of the returned names before > trying to delete them. > > Cheers, > > Chris >