Univention Bugzilla – Bug 44893
purge_s4_computer.py should also delete all references in Samba/AD if the udm object does not exist anymore
Last modified: 2020-06-22 18:29:25 CEST
Scenario: A UCS Backup/Slave with Samba AD has been deleted via UMC/UDM. This leaves references in the Samba AD directory. Unfortunately "purge_s4_computer.py" aborts, because it can't find the object in OpenLDAP. It should nevertheless be possible to get rid of the object and references in Samba AD, even if the object does not exist in OpenLDAP anymore. I guess it's not that trivial to find all correct entries if we only know the hostname. Maybe the tool should list all findings and ask the user to confirm the deletion (similiar to samba-tool dbcheck --fix)?
My take on this would be to recommend samba-tool domain demote (e.g. with the option --remove-other-dead-server). I think we should adjust purge_s4_computer.py to make use of that.