puppetlabs/puppet · error · Puppet::Error
Cannot set the #{setter_method} value of '#{value}' for user
Error message
Cannot set the #{setter_method} value of '#{value}' for user #{@resource.name} due to the following error: #{e.inspect} What it means
Error "Cannot set the #{setter_method} value of '#{value}' for user #{@resource.name} due to the following error: #{e.inspect}" thrown in puppetlabs/puppet.
Source
Thrown at lib/puppet/provider/user/directoryservice.rb:461
# the new value. Because we're prefetching instances of the provider, it's
# possible that the value determined at the start of the run may be stale
# (i.e. someone changed the value by hand during a Puppet run) - if that's
# the case we rescue the error from dscl and alert the user.
#
# In the event that the user doesn't HAVE a value for the attribute, the
# provider should use the -create option with dscl to add the attribute value
# for the user record
%w[home uid gid comment shell].each do |setter_method|
define_method("#{setter_method}=") do |value|
if @property_hash[setter_method.intern]
if %w[home uid].include?(setter_method)
raise Puppet::Error, "OS X version #{self.class.get_os_version} does not allow changing #{setter_method} using puppet"
end
begin
dscl '.', '-change', "/Users/#{resource.name}", self.class.ns_to_ds_attribute_map[setter_method.intern], @property_hash[setter_method.intern], value
rescue Puppet::ExecutionFailure => e
raise Puppet::Error, "Cannot set the #{setter_method} value of '#{value}' for user " \
"#{@resource.name} due to the following error: #{e.inspect}", e.backtrace
end
else
begin
dscl '.', '-create', "/Users/#{resource.name}", self.class.ns_to_ds_attribute_map[setter_method.intern], value
rescue Puppet::ExecutionFailure => e
raise Puppet::Error, "Cannot set the #{setter_method} value of '#{value}' for user " \
"#{@resource.name} due to the following error: #{e.inspect}", e.backtrace
end
end
end
end
## ##
## Helper Methods ##
## ##
def assert_full_pbkdf2_passwordView on GitHub (pinned to e227c27540)
When it happens
Trigger: Thrown at lib/puppet/provider/user/directoryservice.rb:461 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of puppetlabs/puppet@e227c27540 (2026-08-21).
Data as JSON: /api/errors/febc4bea84ad1b3a.
Report an issue: GitHub.