puppetlabs/puppet · error · Puppet::Error
Could not set password on #{@resource.class.name}[#{@resourc
Error message
Could not set password on #{@resource.class.name}[#{@resource.name}]: #{detail} What it means
Error "Could not set password on #{@resource.class.name}[#{@resource.name}]: #{detail}" thrown in puppetlabs/puppet.
Source
Thrown at lib/puppet/provider/user/useradd.rb:211
# The password is expected to be in an encrypted format given -e is specified:
tempfile << "#{user}:#{value}\n"
tempfile.flush
# Options '-e' use encrypted password
# Must receive "user:enc_password" as input
# command, arguments = {:failonfail => true, :combine => true}
cmd = [command(:chpasswd), '-e']
execute_options = {
:failonfail => false,
:combine => true,
:stdinfile => tempfile.path,
:sensitive => has_sensitive_data?
}
output = execute(cmd, execute_options)
rescue => detail
tempfile.close
tempfile.delete
raise Puppet::Error, "Could not set password on #{@resource.class.name}[#{@resource.name}]: #{detail}", detail.backtrace
end
# chpasswd can return 1, even on success (at least on AIX 6.1); empty output
# indicates success
raise Puppet::ExecutionFailure, "chpasswd said #{output}" if output != ''
end
verify :gid, "GID must be an integer" do |value|
value.is_a? Integer
end
verify :groups, "Groups must be comma-separated" do |value|
value !~ /\s/
end
has_features :manages_homedir, :allows_duplicates, :manages_expiry
has_features :system_users unless %w[HP-UX Solaris].include? Puppet.runtime[:facter].value('os.name')
View on GitHub (pinned to e227c27540)
When it happens
Trigger: Thrown at lib/puppet/provider/user/useradd.rb:211 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/14c2115eb35f5888.
Report an issue: GitHub.