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

Use SYSTEM as the directory owner #401

Closed
wants to merge 1 commit into from
Closed

Use SYSTEM as the directory owner #401

wants to merge 1 commit into from

Conversation

tas50
Copy link
Contributor

@tas50 tas50 commented May 27, 2016

Description

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.

Issues Resolved

#333

Check List

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.

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.
@mwrock
Copy link
Contributor

mwrock commented May 27, 2016

What about using administrator and falling back to system if that user is not there? Just in case folks already using this expect administrator.

@tas50
Copy link
Contributor Author

tas50 commented May 27, 2016

Any tips on falling back in the Windows world? How would I detect if that user exists?

@smurawski
Copy link
Contributor

While I like the idea of preserving compat - I like the PR as it stands. If there is fallback, you'll have a different configuration on DCs than other servers in the environment. And while the days of domains in the data center are numbered - it's still going to be a while before they all die.

@mwrock
Copy link
Contributor

mwrock commented May 27, 2016

yeah you should be able to do:

u=Chef::Util::Windows::NetUser.new("administrator")
u.get_info

if the user does not exist then the call to get_info will raise Chef::Exceptions::UserIDNotFound

@smurawski
Copy link
Contributor

👍

@mwrock
Copy link
Contributor

mwrock commented May 27, 2016

that sounds reasonable. Just wanted to bring it up and see if alarms sounded with anyone. 👍

@smurawski
Copy link
Contributor

@mwrock one thing to be aware of - the difference in the wmi query to your netuser thing is that the wmi call will find re-named administrator accounts, where the netuser approach is reliant on the admin account not being renamed.

@tas50 tas50 closed this Sep 26, 2016
@tas50 tas50 deleted the windows_user branch September 26, 2016 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants