When using ldbedit (from s4 master), if the resulting LDIF is not parsed correctly, then the rest of the records are removed. I've reproduced this problem by inserting a "+" sign into the DN. That results in: Error: Unable to parse dn 'CN=work+,CN=Profiles' # 0 adds 0 modifies 5 deletes (where those 5 deletes are the record I'm editing, plus any following records) It would be better if ldbedit provided the warning/error message and didn't make any changes to the database. The error message might be slightly better if it also had a line number, but that is much less important.
Patch is currently under review.
The fix has made it to "master": http://gitweb.samba.org/samba.git/?p=samba.git;a=commitdiff;h=79d3532f7f905afe1a48acabf75247cef6f791e3 Hope that this is resolved.