-
Notifications
You must be signed in to change notification settings - Fork 210
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
"FATAL: Wrong number of arguments" running chef-server-ctl user-create if password contains shell characters that aren't escaped, even if quoted #84
Comments
The issue is that the password starts with >. It appears we aren't escaping shell characters before we shell out to the underlying knife-opc commands: Thus, that is being treated as a redirect in the underlying command. My guess is that if you look in the directory where you ran this command, you have a file named: "w3ma}AC@eLAo!nm" |
@stevendanna you're absolutely correct about the file w3ma}AC@eLAo!nm having been created. |
@stevendanna I was able to get this to work by escaping the password:
I'm going to check that the password matches what I intended. |
@kenny-evitt Thanks. I've posted a possible fix to the opscode-omnibus repo. As you found, escaping any special shell characters should allow you to work around this issue. |
@stevendanna I was able to login to Chef Manage just now so the password matches. Should I leave this issue open until a fix has been made? |
@kenny-evitt Fine to leave it open, I'll close all related issues when the fix is released. |
@stevendanna thanks! |
Am I missing something?
From Install the Chef Server — Chef Server:
And that mostly matches the help text when running
chef-server-ctl user-create
with no arguments:So why is this not working:
sudo chef-server-ctl user-create kenny-evitt Kenny Evitt kenny@example.org '>w3ma}AC@eLAo!nm' --filename /home/kenny/chef-kenny_evitt.key
That's the actual password I was trying to use.
How or why is this not working? Is it not in fact necessary to create an admin user? Or is there some other way to do this? Is the documentation, and the command help text, just wrong?
I installed and configure the latest version of Chef Server (package chef-server-core_12.0.3-1_amd64.deb) on an Ubuntu 14.04 x64 VM running on DigitalOcean.
The text was updated successfully, but these errors were encountered: