locked
User Rights RRS feed

  • Question

  • Does anyone know if you can access the "User Rights Assignments" (i.e. "Access this computer from the network," "Change system time) of a computer in its registry using the Registry Editor? For example, I would like to read a registry key from the registry that tells me if "Change system time" is set to Admin, Power Users, Everyone, etc. I have to check these policies on computers over the server. 

    I know how to do it using C# (and VB) .NET and the registry, if I know the location of the keys (see code below). If anyone knows if such keys do exist and where (HKEY_LOCAL_MACHINE\System\blah\blah...) please let me know. If you don't think such keys exist please let me know and feel free to suggest any other ways to access these policies. Thanks.

    Here is how I read the keys to check policies when I know the location...

    pc = PCname.Text
        subkey = "Software\Microsoft\Windows\CurrentVersion\policies\system"
        regKey = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine, pc).OpenSubKey(subkey)
        value = regKey.GetValue("shutdownwithoutlogon")
    Tuesday, June 28, 2005 2:15 PM

Answers

  • You do realize that what you find in the registry is probably not the same as the effective rights as overridden by the domain controller?

    I have not found a .NET way or a registry way to get this information. You can get more info in the authorization section of the platform SDK. You may also be able to get the information by automating access to the MMC snap-in that displays this information, but that's the long way around.
    Tuesday, June 28, 2005 4:23 PM