Permalink
Browse files

Fix user password change on systems not using bash as system shell.

Rather attempt to specify newline and escape options to echo, insert the newline in ruby, and rely on the echo newline.
  • Loading branch information...
1 parent d6e2ef1 commit 9675f54d3f46fb5122fd5bf48e2164ce645187e2 @leth leth committed Jun 13, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 providers/user.rb
View
@@ -25,7 +25,7 @@
unless @smbuser.exists
pw = new_resource.password
execute "Create #{new_resource.name}" do
- command "echo -ne '#{pw}\n#{pw}\n' | smbpasswd -s -a #{new_resource.name}"
+ command "echo '#{pw}\n#{pw}' | smbpasswd -s -a #{new_resource.name}"
end
new_resource.updated_by_last_action(true)
end

0 comments on commit 9675f54

Please sign in to comment.