chef-windows

Access the registry of another user with Chef

蹲街弑〆低调 提交于 2019-12-03 20:31:34
问题 Is it possible to access the registry of another user with Chef? I have the chef-client running as System and I want to modify the registry of User1? Is there a way to do this? The registry_key resource provides a way to access HKEY_Users but I see no way to map the username to the SID. 回答1: This ended up being mildly convoluted and looking at it makes me cringe. But it seems to work! I wanted to modify another user's environment variables via the registry, as described in this Server Fault

Access the registry of another user with Chef

元气小坏坏 提交于 2019-11-30 15:56:13
Is it possible to access the registry of another user with Chef? I have the chef-client running as System and I want to modify the registry of User1? Is there a way to do this? The registry_key resource provides a way to access HKEY_Users but I see no way to map the username to the SID. Kenny Evitt This ended up being mildly convoluted and looking at it makes me cringe. But it seems to work! I wanted to modify another user's environment variables via the registry, as described in this Server Fault answer , but I also wanted to create the user with Chef. The problem then is that Windows doesn't