From e04ac82a3bc5611cea72f67d622d92848c732066 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Fri, 27 May 2016 12:22:02 -0700 Subject: [PATCH] Use SYSTEM as the directory owner We're currently trying to find a local admin account, but that won't exist on a DC. SYSTEM will always exist and administrators group still has write on the dirs so this is really no change. --- libraries/helpers.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/helpers.rb b/libraries/helpers.rb index 59e30028..71166619 100644 --- a/libraries/helpers.rb +++ b/libraries/helpers.rb @@ -34,8 +34,8 @@ def chef_client_service_running end def root_owner - if ['windows'].include?(node['platform']) - wmi_property_from_query(:name, "select * from Win32_UserAccount where sid like 'S-1-5-21-%-500' and LocalAccount=True") + if platform?('windows') + 'SYSTEM' else 'root' end