You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had the issue that wrong SIDs are reported by the module and started to investigate it a bit deeper.
We have a template for Windows machines which we update from time to time and execute sysprep before we shutdown the machine (or after we deployed a new one).
As it turned out, the SID in the registry is not always unique. Sometimes there is still an old one present after a sysprep. Don't know exactly why. And, as it loops though the keys, the last one is the one sent back to puppet. And in our case that was the same (old) SID very often. So, that not seems like a 100% reliable way to get the SID.
After searching around for a better way to get the SID i found that there are Puppet functions to translate users (or the machines name) to its SID and back. So it's possible to simply use it like this:
I had the issue that wrong SIDs are reported by the module and started to investigate it a bit deeper.
We have a template for Windows machines which we update from time to time and execute sysprep before we shutdown the machine (or after we deployed a new one).
As it turned out, the SID in the registry is not always unique. Sometimes there is still an old one present after a sysprep. Don't know exactly why. And, as it loops though the keys, the last one is the one sent back to puppet. And in our case that was the same (old) SID very often. So, that not seems like a 100% reliable way to get the SID.
After searching around for a better way to get the SID i found that there are Puppet functions to translate users (or the machines name) to its SID and back. So it's possible to simply use it like this:
productkey = Puppet::Util::Windows::SID.name_to_sid(Facter.value(:hostname))
What i'm not sure is when this became supported exactly.
The text was updated successfully, but these errors were encountered: