I have a group (that I added myself) that's simply undeletable for some reason I cannot fathom:
root@voff:~# samba-tool group delete systemusers
ERROR(ldb): Failed to remove group "systemusers" - error in module samldb: Entry already exists during LDB_DELETE (68)
root@voff:~# net ads search '(CN=systemusers)'
Got 1 replies
description: Domain Unix group
memberOf: CN=Domain Users,CN=Users,DC=ad,DC=samfundet,DC=no
Trying with LDAP manually gives the exact same error. I can modify the object (e.g. I already removed “objectclass: posixGroup” and “gidNumber: 100”), but I cannot delete it, even though it's not in use.
Turning up the debug level seems to indicate there's already something there:
[2015/01/21 21:17:36.446842, 10, pid=7017, effective(0, 0), real(0, 0), class=ldb] ../lib/ldb-samba/ldb_wrap.c:71(ldb_wrap_debug)
ldb: ldb_trace_response: ENTRY
dn: CN=sweep\0ADEL:f80857e2-7a7b-4f43-a0bf-7f1e9995c5c7,CN=Deleted Objects,DC=ad,DC=samfundet,DC=no
Could this be the reason for the confusing messages?
This was reported back in 2015 and there have been numerous changes to the code since then.
I created the same group 'systemusers' in my AD, using the same values on Samba 4.13.2
I was able to delete the group easily, so closing this bug report.