Registry key values reverted to default after reboot in windows 2019
Olivia Zamora
To enable the admin share, I need to modify the LocalAccountTokenFilterPolicy value to 1, so I set
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System Value: LocalAccountTokenFilterPolicy = 1But when I rebooted the machine, the value is reverted back to 0. In Windows 2012 and 2016 I didn't face any prolem, but for Windows 2019 I am facing this issue.
1 Answer
To help prevent a value changing, in Regedit:
- First, export the key, or better, back up the Registry lest something go amiss.
- Change the value of LocalAccountTokenFilterPolicy to 1, as desired.
- Then, Right-click on the key containing the value.
- Click on Permissions.
- Click the Advanced button.
- Change Owner to yourself.
- Remove Full Control from other users than yourself, wherever possible.
- If this is not sufficient to "lock" the value after reboot, then repeat as above and finally change Owner to NT Service\TrustedInstaller.
Caveat: It is possible that some Windows process might still change the value, or might fail to work properly. In that case, there's a workaround:
- Right-click the key and Export it with the correct value for LocalAccountTokenFilterPolicy.
- After each reboot, run the script to restore the value.