Remote Regstry access denied for non-admin user

自古美人都是妖i 提交于 2021-02-18 19:20:29

问题


I am trying to open remote registry key with a non admin user who has been given access to registry key on remote machine.

remoteKey = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine, hostname);

I am getting

Requested registry access is not allowed. at System.ThrowHelper.ThrowSecurityException(ExceptionResource resource) at Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable) at Microsoft.Win32.RegistryKey.OpenSubKey(String name) at RemoteRegistry.Program.Main(String[] args)

Is it possible to access HKLM hive to be accessed remotely from any other machine for non-admin user ? on the other hand for admin user it works fine.

All other hives are accessible the above line does not cause any exception.

Any pointers what could be the issue.


回答1:


By default, remote access to most parts of the registry is only available to administrators. You can grant access to other users by changing permissions on the winreg registry key.

There is also a group policy setting (under Computer Configuration - Windows Settings - Security Settings - Local Policies - Security Options - Network access) which allows remote access to particular registry keys to all authenticated users.




回答2:


Check these levels:

  1. Default domain security settings apply to all systems/users in the domain, Unless block inheritance etc. is being utilized

  2. Default Domain control security settings - only apply to DCs

  3. Local computer policy - is the setting on the local machine



来源:https://stackoverflow.com/questions/11707243/remote-regstry-access-denied-for-non-admin-user

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!