{"record":{"id":"b8bd03f5fba1285f","repo":"puppetlabs/puppet","slug":"could-not-set-property-on-resource-name","errorCode":null,"errorMessage":"Could not set %{property} on %{resource}[%{name}]: %{detail}","messagePattern":"Could not set %(.+?) on %(.+?)\\[%(.+?)\\]: %(.+?)","errorType":"exception","errorClass":"Puppet::Error","httpStatus":null,"severity":"error","filePath":"lib/puppet/provider/aix_object.rb","lineNumber":380,"sourceCode":"    execute(modifycmd(new_attributes))\n    object_info(true)\n  end\n\n  # Gets a Puppet property's value from object_info\n  def get(property)\n    return :absent unless exists?\n\n    object_info[property] || :absent\n  end\n\n  # Sets a mapped Puppet property's value.\n  def set(property, value)\n    aix_attribute = mappings[:aix_attribute][property]\n    modify_object(\n      { aix_attribute.name => aix_attribute.convert_property_value(value) }\n    )\n  rescue Puppet::ExecutionFailure => detail\n    raise Puppet::Error, _(\"Could not set %{property} on %{resource}[%{name}]: %{detail}\") % { property: property, resource: @resource.class.name, name: @resource.name, detail: detail }, detail.backtrace\n  end\n\n  # This routine validates our new attributes property value to ensure\n  # that it does not contain any Puppet properties.\n  def validate_new_attributes(new_attributes)\n    # Gather all of the <puppet property>, <aix attribute> conflicts to print\n    # them all out when we create our error message. This makes it easy for the\n    # user to update their manifest based on our error message.\n    conflicts = {}\n    mappings[:aix_attribute].each do |property, aix_attribute|\n      next unless new_attributes.key?(aix_attribute.name)\n\n      conflicts[:properties] ||= []\n      conflicts[:properties].push(property)\n\n      conflicts[:attributes] ||= []\n      conflicts[:attributes].push(aix_attribute.name)\n    end","sourceCodeStart":362,"sourceCodeEnd":398,"githubUrl":"https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/provider/aix_object.rb#L362-L398","documentation":"The AIX providers change entities by executing commands such as chuser/chgroup; set() maps the Puppet property to its AIX attribute and calls modify_object. When the command exits non-zero, Puppet::ExecutionFailure is wrapped into Puppet::Error including the property, resource type, resource title and the command output (detail), with the original backtrace attached. The message is a wrapper - the real reason is in the AIX command output carried in the detail.","triggerScenarios":"user { 'bob': uid => 1001 } where chuser fails: insufficient privileges (agent not root), the attribute is rejected by AIX policy, or the user lives in a different I&A module than the one targeted; group changes hitting chgroup errors.","commonSituations":"Running the agent as non-root on AIX; forcelocal/ia_load_module mismatching where the account actually resides; AIX security settings (e.g. LDAP restrictions) refusing attribute changes; values outside the legal range for the entity.","solutions":["Run the AIX command shown in the detail message manually as the same user to see the real error.","Run puppet with sufficient privileges on AIX (normally root).","Check that forcelocal / ia_load_module point at the I&A database where the entity actually lives.","Verify the attribute/value is legal for the entity type (man chuser / man chgroup)."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"begin\n  provider.set(:uid, 1001)\nrescue Puppet::Error => e\n  # e.message carries the property, resource title and AIX command output\n  Puppet.err(\"AIX update failed for #{resource.title}: #{e.message}\")\n  raise\nend","preventionTips":["Run the AIX agent as root; chuser/chgroup attribute changes require it.","Align forcelocal / ia_load_module with the I&A database where the account or group actually resides.","Pre-check numeric and enumerated attribute values (ranges, policy) before syncing."],"tags":["puppet","aix","user-management","command-execution","provider"],"backgroundTag":"command-execution-failed","analyzedSha":"e227c27540975c25aa22d533a52424a9d2fc886a","analyzedAt":"2026-08-21T20:49:46.650Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}