Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #168 Default owner of 'root' fails on Windows #171

Merged
merged 1 commit into from
Dec 6, 2016

Conversation

sgtcoolguy
Copy link
Contributor

Description

Changes default of owner on resource from 'root' to nil. Then uses lazy init to set default owner if the value is still nil. On non-windows, sets 'root'. On Windows, uses WMI query to grab local admin account (typically 'Administrator'). The code for grabbing the windows admin user was copied from https://github.com/chef-cookbooks/chef-client/blob/master/libraries/helpers.rb#L37

Ultimately the WMI query code in that helper looks very similar to the one in the windows cookbook here: https://github.com/chef-cookbooks/windows/blob/master/libraries/wmi_helper.rb#L22

Perhaps both this and the chef-client cookbook can just re-use it?

Issues Resolved

Check List

@tas50
Copy link
Contributor

tas50 commented Dec 6, 2016

@sgtcoolguy You have a few failing chefspecs in Travis

@tas50 tas50 merged commit e790c0d into sous-chefs:master Dec 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants