[PUP-7761] New users with null passwords not created correctly Created: 2017/07/07  Updated: 2018/06/05

Status: Accepted
Project: Puppet
Component/s: Types and Providers
Affects Version/s: PUP 4.10.4
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Sean Millichamp Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Platforms using the useradd and libuser providers.

Acceptance Criteria:

User creation should set all desired parameters to the intended values in a single Puppet run.

Epic Link: User Type/Provider Improvements
Team: Platform OS
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:

user { 'testuser': password => '' }

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

Generated at Sun Dec 15 11:08:06 PST 2019 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.