Recover deleted objects

Stefan Kania stefan at kania-online.de
Thu Aug 16 19:20:59 UTC 2018


Hello everyone,
maybe my problem is more technically or it maybe a bug? I could not find
anything.
I try to recover a deleted Object. My Setup:
Debian 9
bind9
samba 4.8.3 the packages from Louis van Belle

I created a user:
root at sambabuch:~# samba-tool user create del-ohne-bin
then I deleted the user:
root at sambabuch:~# samba-tool user delete del-ohne-bin

Then i searched for the deleted object:
----------------
root at sambabuch:~# ldbsearch -H ldap://sambabuch -k yes --show-deleted
cn=del-ohne-bin\\0ADEL:*
# record 1
dn:
CN=del-ohne-bin\0ADEL:b16268e9-cba7-4a00-8261-993845df2b30,CN=Deleted
Objects,DC=example,DC=net
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: user
.
.
.
----------------

Then I try to rename the deleted object:
----------------
root at sambabuch:~# ldbrename -H ldap://sambabuch -k yes --show-deleted
'CN=del-ohne-bin\0ADEL:b16268e9-cba7-4a00-8261-993845df2b30,CN=Deleted
Objects,DC=example,DC=net' "cn=del-ohne-bin,cn=users,dc=example,dc=net"
rename of
'CN=del-ohne-bin\0ADEL:b16268e9-cba7-4a00-8261-993845df2b30,CN=Deleted
Objects,DC=example,DC=net' to
'cn=del-ohne-bin,cn=users,dc=example,dc=net' failed - LDAP error 32
LDAP_NO_SUCH_OBJECT -  <00002030: ldb_wait from
../source4/ldap_server/ldap_backend.c:486 with LDB_WAIT_ALL: No such
object (32)> <>

----------------
And as you can see LDAP error 32 :-(

Now it getting real strange. If I try to find the deleted object with
it's full DN: got this result:
-----------------
root at sambabuch:~# ldbsearch -H ldap://sambabuch -k yes --show-deleted
'CN=del-ohne-bin\0ADEL:b16268e9-cba7-4a00-8261-993845df2b30,CN=Deleted
Objects,DC=example,DC=net'
# Referral
ref: ldap://example.net/CN=Configuration,DC=example,DC=net

# Referral
ref: ldap://example.net/DC=DomainDnsZones,DC=example,DC=net

# Referral
ref: ldap://example.net/DC=ForestDnsZones,DC=example,DC=net

# returned 3 records
# 0 entries
# 3 referrals
-----------------
So as soon as I use "CN=Deleted Objects" with ldbsearch or ldbrename the
object is not found anymore. I tried it with a backslash before the
blank, but it's the same.

So my question is it not possible anymore to recover deleted objects? Or
is there just a different way?


Stefan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20180816/18754da0/signature.sig>


More information about the samba-technical mailing list