Puppet Version: 6.17
Puppet Server Version: 6.12.1
OS Name/Version: AIX 7.2
When using a user resource on AIX and setting the password, the password is updated every agent run. This happens when a user stanza contains a tab in the password line.
This is because the regex in https://github.com/puppetlabs/puppet/blob/main/lib/puppet/provider/user/aix.rb#L181 does not account for tabs or multiple spaces.
1. In an AIX 7.2 node add a user resource.
2. Edit the /etc/security/passwd file to add a tab to the password line.
3. Apply the user resource multiple times and confirm that the password it changed b every run.
The password should be set once unless the password changed.
The detection of the current password has an incorrect regex and updates the password every agent run.
Change the regex in https://github.com/puppetlabs/puppet/blob/main/lib/puppet/provider/user/aix.rb#L181 to be /password\s+=\s+(\S+)/