Bug 15762 - script enablerecyclebin
Summary: script enablerecyclebin
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: AD: LDB/DSDB/SAMDB (show other bugs)
Version: 4.21.1
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-06 19:04 UTC by Stefan Kania
Modified: 2026-03-13 16:08 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Kania 2024-12-06 19:04:10 UTC
After enabling recyclebin with the script enablerecyclebin from the sources, there are no more deleted object in "cn=deleted objects" it look like the objects will be deleted immediately.
I'm using Samba 4.21.1 from the Debian bookworm-backports and the script from the sources of Samba 4.21.1.

So if the script is broken, it should be removed or fixed.
Comment 1 Rowland Penny 2026-03-13 14:47:50 UTC
(In reply to Stefan Kania from comment #0)

I do not think the script is broken, it appears to do what it should, whether it should be used is another question.

If you go here:

https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/dd379542(v=ws.10)?redirectedfrom=MSDN

You will find this:

Important

When Active Directory Recycle Bin is enabled, all objects that were deleted before Active Directory Recycle Bin was enabled (that is, all tombstone objects) become recycled objects. These objects are no longer visible in the Deleted Objects container, and they cannot be recovered with Active Directory Recycle Bin. The only way to restore these objects is through an authoritative restore from a backup of AD DS that was taken of the environment before Active Directory Recycle Bin was enabled. 

Which to myself, sounds like Stefan's problem.
Comment 2 Stefan Kania 2026-03-13 16:08:59 UTC
The problem isn't just that the objects in the “deleted objects” folder—which were already there before activation—disappear, but that after activation, no objects are saved there at all. The folder remains empty.