#4512 Bad error message when adding non existing user to a group
Closed: wontfix 5 years ago Opened 9 years ago by tscherf.

If you try to add an non existing user to an existing group, you get a generic error message:

# ipa group-add-member ipausers --users=foo
  Group name: ipausers
  Description: Default group for all users
  Member users: tscherf
  Failed members: 
    member user: foo: no such entry
    member group: 
-------------------------
Number of members added 0
-------------------------

It would be better to get an error like:

>member Error: foo: User not found

Changing the error message is one part. There was also an idea to display the error message as a warning instead of misusing entry attribute for error message as we do now (and did since long ago).

As such, this is a bigger effort than just changing an error message, moving to later release.

Metadata Update from @tscherf:
- Issue assigned to someone
- Issue set to the milestone: Future Releases

7 years ago

I believe function "error_handler" generates generic message in case of exception NO_SUCH_OBJECT
Again it also treats --groups=, --external= as objects.
I think It would be difficult to distinguish b/w user, group, domain-user in present code base, require changes.
...
def add_entry(self, entry):
with self.error_handler():
attrs = self.encode(attrs)
self.conn.add_s(str(entry.dn), list(attrs.items()))
...
def error_handler(self, arg_desc=None):
except ldap.NO_SUCH_OBJECT:
raise errors.NotFound(reason=arg_desc or 'no such entry')
...

Also python module ldap does not lists any of errors 'no_such_user' or group.
/root/python-ldap/Modules/constants_generated.h

Thank you taking time to submit this request for FreeIPA. Unfortunately this bug was not given priority and the team lacks the capacity to work on it at this time.

Given that we are unable to fulfil this request I am closing the issue as wontfix. To request re-consideration of this decision please reopen this issue and provide additional technical details about its importance to you.

Metadata Update from @rcritten:
- Issue close_status updated to: wontfix
- Issue status updated to: Closed (was: Open)

5 years ago

Login to comment on this ticket.

Metadata