[Samba] recover deleted objects

Stefan Kania stefan at kania-online.de
Fri Aug 10 18:47:36 UTC 2018


Hello everybody

I would like to recover a deleted object. I created a user, then I
deleted this user and search for the deleted object with:
-------------
ldbsearch --url=/var/lib/samba/private/sam.ldb --show-deleted
--cross-ncs CN=no-bin\*


# record 1
dn: CN=no-bin\0ADEL:0b2f3fb3-5b25-455f-979c-bd02569c832a,CN=Deleted
Objects,DC=example,DC=net
...
------------
so the delete object is still there. Then I try to rename the object:
------------
root at addc-01:~#  ldbrename -H ldap://sambabuch -k yes --show-deleted
--cross-ncs
'CN=no-bin\0ADEL:0b2f3fb3-5b25-455f-979c-bd02569c832a,CN=Deleted
Objects,DC=example,DC=net' "cn=no-bin,cn=users,dc=example,dc=net"
rename of
'CN=no-bin\0ADEL:0b2f3fb3-5b25-455f-979c-bd02569c832a,CN=Deleted
Objects,DC=example,DC=net' to 'cn=no-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)> <>
------------

Did I miss something? I haven'd done this for years. Is ther a new way
to do it?

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/attachments/20180810/9ed45fc0/signature.sig>


More information about the samba mailing list