summaryrefslogtreecommitdiff
path: root/lib/chef/provider/user
diff options
context:
space:
mode:
authorAnand Suresh <anandsuresh@gmail.com>2014-05-23 19:04:24 -0700
committerAnand Suresh <anandsuresh@gmail.com>2014-05-23 19:04:24 -0700
commitd97bc318c6e0c8afbdfd100c7c61e0fdc9e43398 (patch)
treea8e85b0cab7b70f25263866d68059aef92e03215 /lib/chef/provider/user
parent83b2686a59e637f7ac9888b7e370a4b5a7fc59e8 (diff)
downloadchef-d97bc318c6e0c8afbdfd100c7c61e0fdc9e43398.tar.gz
Only modify password when one has been specified
Obvious fix
Diffstat (limited to 'lib/chef/provider/user')
-rw-r--r--lib/chef/provider/user/pw.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/provider/user/pw.rb b/lib/chef/provider/user/pw.rb
index 9f7a169892..fe71e93561 100644
--- a/lib/chef/provider/user/pw.rb
+++ b/lib/chef/provider/user/pw.rb
@@ -93,7 +93,7 @@ class Chef
end
def modify_password
- if @current_resource.password != @new_resource.password
+ if (not @new_resource.password.nil?) && (@current_resource.password != @new_resource.password)
Chef::Log.debug("#{new_resource} updating password")
command = "pw usermod #{@new_resource.username} -H 0"
status = popen4(command, :waitlast => true) do |pid, stdin, stdout, stderr|