New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[win_lgpo] lgpo_set always reports failure; Registry.pol corruption #49225
Comments
Tested again using the PY2 minion, and there However, the following state: Set branding GPO:
lgpo.set:
- computer_policy:
"Configure Offer Remote Assistance": Disabled still corrupts
|
ping @twangboy i know you have done some recent work around here. mind taking a look here? |
Please do let me know if I can be of any assistance with testing etc. I'd be happy to help. |
@onnodb Could you test this version of win_lgpo.py out and let me know if it makes things happier on your end? https://github.com/lomeroe/salt/blob/issue48782_2018.3/salt/modules/win_lgpo.py |
Yes, absolutely! I'm going to be back in the office on Thursday by the latest, and I'll do a test run ASAP. |
Just checked, and I'm afraid the corruption of
(Just to be sure: this is the PY3 minion with the |
In case it's useful for troubleshooting, I've uploaded the resulting |
Thanks @onnodb I think I see the problem, I made an update to the file linked above. I am just now kicking off tests myself, but feel pretty good about it correcting your issue on py3. |
@onnodb more commits pushed to that file for testing, feeling pretty good about having it all ironed out |
That indeed appears to fix it completely. Wonderful! Many thanks! |
Description of Issue/Question
I can't seem to get
win_lgpo.set
to work while trying to provision a Windows 10 IoT LTSB system. Thelgpo.set
state always returns a failure, showing a stack trace with exceptionsalt.exceptions.CommandExecutionError: Error while attempting to write Administrative Template Policy data. Some changes may not be applied as expected
.Additionally, the
Registry.pol
file gets corrupted, rendering the Local Group Policy Editor unusable.I'll be happy to provide any help you need to further troubleshoot this issue. The Win10 minion is in a VM for testing purposes, and I could easily obtain any files you need from there.
Setup & Steps to Reproduce
There seem to be multiple issues here:
win_lgpo.py:5345
doesn't log the actual exception. To simplify troubleshooting, I changed this locally to include information about the exception for all steps below (simply adding ae
argument to thelog.exception
call).produces the following debug log output on the minion:
The state does seem to get applied correctly, as verified by running
LGPO.exe /parse /m C:\Windows\System32\GroupPolicy\Machine\Registry.pol
.Machine\Registry.pol
file, as also reported in [win_lgpo] Causes corrupt Registry.pol file #48782:Debug output on the minion:
While the initial exception aborting the LGPO update appears to be of the same type, the
Registry.pol
file is now corrupted:Versions Report
Master:
Minion:
The text was updated successfully, but these errors were encountered: