diff options
author | Anand Suresh <anandsuresh@gmail.com> | 2014-05-23 19:04:24 -0700 |
---|---|---|
committer | Anand Suresh <anandsuresh@gmail.com> | 2014-05-23 19:04:24 -0700 |
commit | d97bc318c6e0c8afbdfd100c7c61e0fdc9e43398 (patch) | |
tree | a8e85b0cab7b70f25263866d68059aef92e03215 /lib/chef/provider/user | |
parent | 83b2686a59e637f7ac9888b7e370a4b5a7fc59e8 (diff) | |
download | chef-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.rb | 2 |
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| |