Bug 9846 - Better error message when trying to add members to not existend group
Summary: Better error message when trying to add members to not existend group
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.0
Classification: Unclassified
Component: Tools (show other bugs)
Version: 4.0.5
Hardware: x64 Linux
: P5 trivial (vote)
Target Milestone: ---
Assignee: Andrew Bartlett
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks: 11924
  Show dependency treegraph
 
Reported: 2013-05-02 10:44 UTC by Marc Muehlfeld
Modified: 2022-08-10 23:55 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Muehlfeld 2013-05-02 10:44:27 UTC
If I try to add a user to a group that does not exist, only a python exception is shown instead of a neat message.


# samba-tool group addmembers "not existend group" muehlfeld
ERROR(exception): Failed to add members "muehlfeld" to group "not existend group" - Unable to find group "not existend group"
  File "/usr/local/samba/lib64/python2.6/site-packages/samba/netcmd/group.py", line 211, in run
    add_members_operation=True)
  File "/usr/local/samba/lib64/python2.6/site-packages/samba/samdb.py", line 247, in add_remove_group_members
    raise Exception('Unable to find group "%s"' % groupname)
Comment 1 Douglas Bagnall 2022-08-10 23:55:14 UTC
Now says this:

ERROR: Failed to add members ['joe'] to group "not existend group" - Unable to find group "not existend group"

which is better. The bug title only asks for better, so we can close this.