Univention Bugzilla – Bug 31919
msDS-KeyVersionNumber != krb5KeyVersionNumber after migration to Samba4
Last modified: 2016-10-11 08:01:18 CEST
When migrating a Samba3 Domain to Samba4 the msDS-KeyVersionNumber is 1 for all Samba accounts in the Samba directory service, no matter what krb5KeyVersionNumber they currently have in OpenLDAP. This might explain problems we experienced in the early phase of the UCS 3.0 development in the interaction of clients and services running hosted on Samba4 servers and non-Samba4 servers. When the password is modified in the Samba directory service the S4 Connector unconditionally writes the incremented msDS-KeyVersionNumber to the krb5KeyVersionNumber.
Created attachment 5313 [details] set-user-msDS-KeyVersionNumber-to-value-of-krb5KeyVersionNumber.py Example script which increments the msDS-KeyVersionNumber of all users (not machines) to the value of their krb5KeyVersionNumber. Obviously one could do the reverse as well, re-setting the LDAP-attribute, which might be a better choice especially in the case of DCs (otherwise the msDS-KeyVersionNumber would need to be modified in the local secrets.ldb of the respective DC).
This issue has been filed against UCS 3.1. UCS 3.1 is out of maintenance and many UCS components have vastly changed in later releases. Thus, this issue is now being closed. If this issue still occurs in newer UCS versions, please reopen.