Tuesday 19 January 2016

Windows Local/Group policy edit gone wrong and locked out

Admittedly this was a first for me and I'm not 100% sure what caused it but I applied my secure baseline.inf to a new Windows Server 2012 R2 server and after around a day the server admin couldn't login to the server via RDP as he was getting an error "The system administrator has restricted the type of logon (network or interactive) that you may use. For assistance, contact your system administrator or technical support." (which he indeed did do!).


Now the secure baseline does a lot of changes to a system including, renaming the admin account, specifying the protocol and encryption level for RDP and stating who can do what on the system, so I undid the changes I made regarding RDP just to make sure it was all OK but alas the same error. I even switched off all GPOs, imported the default baseline into Local Security Policy and rebooted but the damn thing still told me to piss off! It seemed like one of the settings was still hanging around regardless and I didn't have to time to delve into the registry and find it so I ran 1 simple command which resets it all back to the way it was as Microsoft originally intended

secedit /configure /cfg %windir%\inf\defltbase.inf /db defltbase.sdb /verbose

Once I ran this everything was back to normal and there was no need to reboot the machine at all.
Now all I have to do is revisit my baseline and update it and confirm all is well again...Might be needing a drink for this one!

No comments:

Post a Comment