[PUP-7761] New users with null passwords not created correctly Created: 2017/07/07 Updated: 2020/03/04
|Component/s:||Types and Providers|
|Affects Version/s:||PUP 4.10.4|
|Remaining Estimate:||Not Specified|
|Time Spent:||Not Specified|
|Original Estimate:||Not Specified|
Platforms using the useradd and libuser providers.
User creation should set all desired parameters to the intended values in a single Puppet run.
|Epic Link:||User Type/Provider Improvements|
|Method Found:||Needs Assessment|
|QA Risk Assessment:||Needs Assessment|
When using Puppet in a Beaker acceptance test to configure a user with a null password (in order to later test to ensure that null passwords would not be permitted to authenticate) I discovered a bug in Puppet when creating users with null passwords.
Given a manifest like:
It requires two Puppet runs to obtain the desired state.
This is due to https://github.com/puppetlabs/puppet/blob/master/lib/puppet/provider/user/useradd.rb#L164 where properties with empty strings are not included.
|Comment by Sean Millichamp [ 2017/07/07 ]|
I have a PR to address this: https://github.com/puppetlabs/puppet/pull/6053