[PUP-7761] New users with null passwords not created correctly Created: 2017/07/07  Updated: 2020/03/04

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: platform-os
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: Night's Watch
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 Jul 12 23:24:12 PDT 2020 using Jira 8.5.2#805002-sha1:a66f9354b9e12ac788984e5d84669c903a370049.