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

ERROR: Logon failure: unknown user name or bad password #152

Closed
xiaoxinyang opened this issue Dec 11, 2013 · 1 comment
Closed

ERROR: Logon failure: unknown user name or bad password #152

xiaoxinyang opened this issue Dec 11, 2013 · 1 comment

Comments

@xiaoxinyang
Copy link

I saw this error when I tried to do chef-solo provision.

After some investigation, I find that C:\tmp\vagrant-chef-1\cheftask.ps1 double-quotes the windows password:
$ grep pass ./lib/vagrant-windows/scripts/cheftask.ps1.erb
schtasks /create /tn "chef-solo" /xml "<%= options[:chef_task_xml] %>" /ru "<%= options[:user] %>" /rp "<%= options[:pass] %>

If the password contains a "$", it will lead to this "Logon failure" error because powershell treats "$..." as a variable which normally results in an empty string.

So, the password should be single-quoted.

@sneal
Copy link
Member

sneal commented Dec 12, 2013

Fixed in 1.4.0

@sneal sneal closed this as completed Dec 12, 2013
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

No branches or pull requests

2 participants