Univention Bugzilla – Bug 44787
Don't re-provision if univention-samba4 gets uninstalled and re-installed
Last modified: 2017-08-01 14:14:09 CEST
Due to Bug #44778 we had cases where univention-samba4 got uninstalled on a DC Master. When the customer/partner re-installed univention-s4-connector the joinscript of univention-samba moved /var/lib/samba out of the way and re-provisioned it. That causes all SIDs to be re-assigned, which causes a time consuming support case to re-establish the old SIDs again. We should avoid re-provisioning in 96univention-samba4.inst when the sam.db is perfectly ok. Also, if we re-provision, technically we would have to clean up the univention-s4-connector state too. But that's a different story.
Created attachment 8926 [details] dont_reprovision_if_samdb_is_ok.diff A first sketch.
I had to move the skip_provision check and the cleanup_var_lib_samba function down to the setup-s4.sh script. To make that work I've moved some helper functions out of the joinscript into lib/base.sh. I think it looks just a little bit cleaner now. Advisory: univention-samba4.yaml
OK - uninstall/re-install univention-samba4 univention-s4-connector on master (backup) -> no re-provision OK - uninstall/re-install univention-samba4 univention-s4-connector on slave backup (master is s4connector) -> join into domain OK - YAML
<http://errata.software-univention.de/ucs/4.2/93.html>