{"record":{"id":"14c2115eb35f5888","repo":"puppetlabs/puppet","slug":"could-not-set-password-on-resource-class-name-14c211","errorCode":null,"errorMessage":"Could not set password on #{@resource.class.name}[#{@resource.name}]: #{detail}","messagePattern":"Could not set password on #(.+?)\\[#(.+?)\\]: #(.+?)","errorType":"exception","errorClass":"Puppet::Error","httpStatus":null,"severity":"error","filePath":"lib/puppet/provider/user/useradd.rb","lineNumber":211,"sourceCode":"      # The password is expected to be in an encrypted format given -e is specified:\n      tempfile << \"#{user}:#{value}\\n\"\n      tempfile.flush\n\n      # Options '-e' use encrypted password\n      # Must receive \"user:enc_password\" as input\n      # command, arguments = {:failonfail => true, :combine => true}\n      cmd = [command(:chpasswd), '-e']\n      execute_options = {\n        :failonfail => false,\n        :combine => true,\n        :stdinfile => tempfile.path,\n        :sensitive => has_sensitive_data?\n      }\n      output = execute(cmd, execute_options)\n    rescue => detail\n      tempfile.close\n      tempfile.delete\n      raise Puppet::Error, \"Could not set password on #{@resource.class.name}[#{@resource.name}]: #{detail}\", detail.backtrace\n    end\n\n    # chpasswd can return 1, even on success (at least on AIX 6.1); empty output\n    # indicates success\n    raise Puppet::ExecutionFailure, \"chpasswd said #{output}\" if output != ''\n  end\n\n  verify :gid, \"GID must be an integer\" do |value|\n    value.is_a? Integer\n  end\n\n  verify :groups, \"Groups must be comma-separated\" do |value|\n    value !~ /\\s/\n  end\n\n  has_features :manages_homedir, :allows_duplicates, :manages_expiry\n  has_features :system_users unless %w[HP-UX Solaris].include? Puppet.runtime[:facter].value('os.name')\n","sourceCodeStart":193,"sourceCodeEnd":229,"githubUrl":"https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/provider/user/useradd.rb#L193-L229","documentation":"Error \"Could not set password on #{@resource.class.name}[#{@resource.name}]: #{detail}\" thrown in puppetlabs/puppet.","triggerScenarios":"Thrown at lib/puppet/provider/user/useradd.rb:211 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e227c27540975c25aa22d533a52424a9d2fc886a","analyzedAt":"2026-08-21T20:49:46.650Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}