Print out the reason we can't delete the user in SAMR.
[samba.git] / source4 / rpc_server / samr / dcesrv_samr.c
index 03f360125766a3efdee58910a6a43b35188f2b43..760d774f2ea6ebc46a8bcebaf199bb077f8e894f 100644 (file)
@@ -2910,6 +2910,9 @@ static NTSTATUS dcesrv_samr_DeleteUser(struct dcesrv_call_state *dce_call, TALLO
 
        ret = ldb_delete(a_state->sam_ctx, a_state->account_dn);
        if (ret != 0) {
 
        ret = ldb_delete(a_state->sam_ctx, a_state->account_dn);
        if (ret != 0) {
+               DEBUG(1, ("Failed to delete user: %s: %s\n", 
+                         ldb_dn_get_linearized(a_state->account_dn), 
+                         ldb_errstring(a_state->sam_ctx)));
                return NT_STATUS_UNSUCCESSFUL;
        }
 
                return NT_STATUS_UNSUCCESSFUL;
        }