Resetting the Discretionary Access Control List (DACL) in a Windows Service security descriptor
OpenService FAILED 5: Access is denied. — “Oh crap!” If you ever see this error and need to reset the DACL on a Windows service, let’s say in case you (or someone else) accidentally deletes it, or configure it to something that prevents you from reading it’s security settings, this might do the trick: First of all, get a cup of coffee. Download PsExec (a tool in PsTools), which among other things allow you to run commands as the “local system” account. Find out what the real name of the service is by looking in the following registry key: HKLMSYSTEMCurrentControlSetServices The real name (not the display name) of the service is the name of the key itself. Start a Command Prompt (cmd) window as administrator. Start a new cmd session as the system account: PsExec.exe /s cmd Now it’s time to set a new DACL, this is done by using the command “sc sdset”…
"The given Key was not present in the dictionary" error when running Group Policy Modeling
I ran into a rather strange error today when trying to run Group Policy Modeling on a user. Instead of showing me Summary and Settings I received an error stating that The given Key was not present in the dictionary. At first I thought that maybe we had used some Norwegian characters somewhere in a policy, but after some googling it turns out that this is caused by ticking the parent registry container when using the Registry Wizard to create a gpo registry preference. Microsoft has published a kb article about it here: http://support.microsoft.com/kb/2692409 However the resolution they are presenting is useless for most organizations I think. Recreating all registry collections is not an option, at least it wasn’t for us. So here’s how to do it in a less time consuming manor (but it may still take some time): Edit any gpo you have used to set registry settings, navigate…