From 8a0dd4477232713f5afd60a5b856c0430aea5a66 Mon Sep 17 00:00:00 2001 From: Aron List Date: Mon, 13 Jan 2020 12:28:02 +0100 Subject: Clear password flags when setting the password This will clear the password flags when the password is set for this user. This ensures that the user will not be prompted to change their password on next login. Signed-off-by: Aron List --- lib/chef/provider/user/aix.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/chef/provider/user/aix.rb b/lib/chef/provider/user/aix.rb index 8a170d276a..1e740909bc 100644 --- a/lib/chef/provider/user/aix.rb +++ b/lib/chef/provider/user/aix.rb @@ -110,7 +110,7 @@ class Chef return unless current_resource.password != new_resource.password && new_resource.password logger.trace("#{new_resource.username} setting password to #{new_resource.password}") - command = "echo '#{new_resource.username}:#{new_resource.password}' | chpasswd -e" + command = "echo '#{new_resource.username}:#{new_resource.password}' | chpasswd -c -e" shell_out!(command) end -- cgit v1.2.1