| Puppet Version: 7.14.0 Puppet Server Version: 7.6.1 OS Name/Version: MacOS 12.3.1 Puppet user provider fails - see also PUP-8330 Desired Behavior: No error Actual Behavior: Errors Creating a local user appears to work on some instances of MacOS but at least one agent fails with: Could not prefetch user provider 'directoryservice': undefined method `unpack' for nil:NilClass This is similar to the error reported in PUP-8330 but a password change does not fix it. # puppet resource user pacscan --trace --debug Debug: Runtime environment: puppet_version=7.14.0, ruby_version=2.7.5, run_mode=user, default_encoding=US-ASCII Debug: Evicting cache entry for environment :production Debug: Deleted text domain :production: false Debug: Caching environment :production (ttl = 0 sec) Debug: Evicting cache entry for environment :production Debug: Deleted text domain :production: false Debug: Facter: Resolving facts sequentially Debug: Facter: resolving fact with user_query: operatingsystem Debug: Facter: Searching fact: operatingsystem in file: operatingsystem.rb Debug: Facter: Searching fact: operatingsystem in core facts and external facts Debug: Facter: Loading all internal facts Debug: Facter: List of resolvable facts: [#<Facter::SearchedFact:0x00007f97428120a0 @name="operatingsystem", @fact_class=Facts::Macosx::Os::Name, @user_query="operatingsystem", @type=:legacy, @file=nil>] Debug: Facter: Executing command: uname -m && uname -n && uname -p && uname -r && uname -s && uname -v Debug: Facter: Loading external facts Debug: Facter: fact "operatingsystem" has resolved to: Darwin Debug: Facter: resolving fact with user_query: operatingsystem Debug: Facter: Searching fact: operatingsystem in file: operatingsystem.rb Debug: Facter: Searching fact: operatingsystem in core facts and external facts Debug: Facter: Loading all internal facts Debug: Facter: List of resolvable facts: [#<Facter::SearchedFact:0x00007f979718c8e8 @name="operatingsystem", @fact_class=Facts::Macosx::Os::Name, @user_query="operatingsystem", @type=:legacy, @file=nil>] Debug: Facter: Loading external facts Debug: Facter: fact "operatingsystem" has resolved to: Darwin Debug: Facter: resolving fact with user_query: operatingsystem Debug: Facter: Searching fact: operatingsystem in file: operatingsystem.rb Debug: Facter: Searching fact: operatingsystem in core facts and external facts Debug: Facter: Loading all internal facts Debug: Facter: List of resolvable facts: [#<Facter::SearchedFact:0x00007f9792abe6a0 @name="operatingsystem", @fact_class=Facts::Macosx::Os::Name, @user_query="operatingsystem", @type=:legacy, @file=nil>] Debug: Facter: Loading external facts Debug: Facter: fact "operatingsystem" has resolved to: Darwin Debug: Puppet::Type::User::ProviderUseradd: file useradd does not exist Debug: Facter: resolving fact with user_query: operatingsystem Debug: Facter: Searching fact: operatingsystem in file: operatingsystem.rb Debug: Facter: Searching fact: operatingsystem in core facts and external facts Debug: Facter: Loading all internal facts Debug: Facter: List of resolvable facts: [#<Facter::SearchedFact:0x00007f9782149aa8 @name="operatingsystem", @fact_class=Facts::Macosx::Os::Name, @user_query="operatingsystem", @type=:legacy, @file=nil>] Debug: Facter: Loading external facts Debug: Facter: fact "operatingsystem" has resolved to: Darwin Debug: Puppet::Type::User::ProviderPw: file pw does not exist Debug: Facter: resolving fact with user_query: operatingsystem Debug: Facter: Searching fact: operatingsystem in file: operatingsystem.rb Debug: Facter: Searching fact: operatingsystem in core facts and external facts Debug: Facter: Loading all internal facts Debug: Facter: List of resolvable facts: [#<Facter::SearchedFact:0x00007f978213b4d0 @name="operatingsystem", @fact_class=Facts::Macosx::Os::Name, @user_query="operatingsystem", @type=:legacy, @file=nil>] Debug: Facter: Loading external facts Debug: Facter: fact "operatingsystem" has resolved to: Darwin Debug: Puppet::Type::User::ProviderUser_role_add: file useradd does not exist Debug: Could not find library 'ldap' required to enable feature 'ldap' Debug: Puppet::Type::User::ProviderLdap: feature ldap is missing Debug: Puppet::Type::User::ProviderOpenbsd: file useradd does not exist Debug: Facter: resolving fact with user_query: operatingsystem Debug: Facter: Searching fact: operatingsystem in file: operatingsystem.rb Debug: Facter: Searching fact: operatingsystem in core facts and external facts Debug: Facter: Loading all internal facts Debug: Facter: List of resolvable facts: [#<Facter::SearchedFact:0x00007f97961814d0 @name="operatingsystem", @fact_class=Facts::Macosx::Os::Name, @user_query="operatingsystem", @type=:legacy, @file=nil>] Debug: Facter: Loading external facts Debug: Facter: fact "operatingsystem" has resolved to: Darwin Debug: Facter: resolving fact with user_query: operatingsystem Debug: Facter: Searching fact: operatingsystem in file: operatingsystem.rb Debug: Facter: Searching fact: operatingsystem in core facts and external facts Debug: Facter: Loading all internal facts Debug: Facter: List of resolvable facts: [#<Facter::SearchedFact:0x00007f9782121e90 @name="operatingsystem", @fact_class=Facts::Macosx::Os::Name, @user_query="operatingsystem", @type=:legacy, @file=nil>] Debug: Facter: Loading external facts Debug: Facter: fact "operatingsystem" has resolved to: Darwin Debug: Facter: resolving fact with user_query: operatingsystem Debug: Facter: Searching fact: operatingsystem in file: operatingsystem.rb Debug: Facter: Searching fact: operatingsystem in core facts and external facts Debug: Facter: Loading all internal facts Debug: Facter: List of resolvable facts: [#<Facter::SearchedFact:0x00007f979213e508 @name="operatingsystem", @fact_class=Facts::Macosx::Os::Name, @user_query="operatingsystem", @type=:legacy, @file=nil>] Debug: Facter: Loading external facts Debug: Facter: fact "operatingsystem" has resolved to: Darwin Debug: Facter: resolving fact with user_query: operatingsystem Debug: Facter: Searching fact: operatingsystem in file: operatingsystem.rb Debug: Facter: Searching fact: operatingsystem in core facts and external facts Debug: Facter: Loading all internal facts Debug: Facter: List of resolvable facts: [#<Facter::SearchedFact:0x00007f9795925f70 @name="operatingsystem", @fact_class=Facts::Macosx::Os::Name, @user_query="operatingsystem", @type=:legacy, @file=nil>] Debug: Facter: Loading external facts Debug: Facter: fact "operatingsystem" has resolved to: Darwin Debug: Facter: resolving fact with user_query: operatingsystem Debug: Facter: Searching fact: operatingsystem in file: operatingsystem.rb Debug: Facter: Searching fact: operatingsystem in core facts and external facts Debug: Facter: Loading all internal facts Debug: Facter: List of resolvable facts: [#<Facter::SearchedFact:0x00007f97820f1ba0 @name="operatingsystem", @fact_class=Facts::Macosx::Os::Name, @user_query="operatingsystem", @type=:legacy, @file=nil>] Debug: Facter: Loading external facts Debug: Facter: fact "operatingsystem" has resolved to: Darwin Debug: Puppet::Type::User::ProviderUseradd: file useradd does not exist Debug: Facter: resolving fact with user_query: operatingsystem Debug: Facter: Searching fact: operatingsystem in file: operatingsystem.rb Debug: Facter: Searching fact: operatingsystem in core facts and external facts Debug: Facter: Loading all internal facts Debug: Facter: List of resolvable facts: [#<Facter::SearchedFact:0x00007f97958a8868 @name="operatingsystem", @fact_class=Facts::Macosx::Os::Name, @user_query="operatingsystem", @type=:legacy, @file=nil>] Debug: Facter: Loading external facts Debug: Facter: fact "operatingsystem" has resolved to: Darwin Debug: Puppet::Type::User::ProviderPw: file pw does not exist Debug: Facter: resolving fact with user_query: operatingsystem Debug: Facter: Searching fact: operatingsystem in file: operatingsystem.rb Debug: Facter: Searching fact: operatingsystem in core facts and external facts Debug: Facter: Loading all internal facts Debug: Facter: List of resolvable facts: [#<Facter::SearchedFact:0x00007f97969273b0 @name="operatingsystem", @fact_class=Facts::Macosx::Os::Name, @user_query="operatingsystem", @type=:legacy, @file=nil>] Debug: Facter: Loading external facts Debug: Facter: fact "operatingsystem" has resolved to: Darwin Debug: Puppet::Type::User::ProviderUser_role_add: file useradd does not exist Debug: Puppet::Type::User::ProviderLdap: feature ldap is missing Debug: Puppet::Type::User::ProviderOpenbsd: file useradd does not exist Debug: Executing: '/usr/bin/dscl -plist . readall /Users' Debug: Executing: '/usr/bin/dscl -plist . readall /Groups' Debug: Converting binary plist to hash Debug: Converting binary plist to hash Debug: Converting binary plist to hash Error: Could not run: undefined method `unpack' for nil:NilClass /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/user/directoryservice.rb:211:in `get_salted_sha512_pbkdf2' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/user/directoryservice.rb:151:in `generate_attribute_hash' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/user/directoryservice.rb:88:in `block in instances' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/user/directoryservice.rb:87:in `collect' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/user/directoryservice.rb:87:in `instances' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type.rb:1186:in `block in instances' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type.rb:1185:in `collect' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type.rb:1185:in `instances' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/resource/ral.rb:14:in `find' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:223:in `find' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/resource.rb:231:in `block in find_or_save_resources' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:62:in `override' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:302:in `override' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/resource.rb:228:in `find_or_save_resources' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/resource.rb:147:in `block in main' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:62:in `override' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:302:in `override' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/resource.rb:142:in `main' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:437:in `run_command' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:421:in `block in run' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:744:in `exit_on_fail' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:421:in `run' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:143:in `run' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:77:in `execute' /opt/puppetlabs/puppet/bin/puppet:5:in `<main>' |