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

Incorrect casing on run_as_user cases windows_service to restart every run #8715

dalee-bis opened this issue Jul 5, 2019 · 0 comments


None yet
2 participants
Copy link

commented Jul 5, 2019


When using the windows_service resource, if the run_as_user property differs only by case, chef will attempt to apply the change and restart the service so that it takes effect. Unfortunately, Windows does not store the casing change as the value is case-insensitive. This results in Chef attempting to make the change every time it runs (thus restarting the service).

In our case, this meant the service was only online for 15 minutes at a time. To resolve this, we had to change the credentials to another user account, then change them back with the casing Chef expected.

Chef Version

Chef: 14.2.0

Platform Version

Windows Server 2016

Replication Case

  1. Ensure a Windows Service exists which runs as a user account. Ensure the credentials are entered in all lowercase.
  2. Create a Chef recipe which includes a windows_service resource. Specify the same credentials in the resource definition but use all upper case.
  3. Run the cookbook multiple times, the service will be restarted on each run.

Client Output

Client output cannot be included as it contains a password but was identical on each run. The windows_service resource was configured with a new username and password and then restarted.


No error is thrown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.