[Samba] samba-tool cannot add or remove group members
Rowland Penny
rpenny at samba.org
Mon May 29 21:17:40 UTC 2017
On Mon, 29 May 2017 23:01:43 +0200 (CEST)
Sébastien QUESSON via samba <samba at lists.samba.org> wrote:
> samba-tool group addmembers domaingroup 'SAMDOM\user1'
> ERROR(exception): Failed to add members "SAMDOM\user1" to group
> "domaingroup" - Unable to find "SAMDOM\user1". Operation cancelled.
>
> samba-tool group addmembers 'SAMDOM\domaingroup' 'SAMDOM\user1'
> ERROR(exception): Failed to add members "SAMDOM\user1" to group
> "SAMDOM\domaingroup" - Unable to find group "SAMDOM\domaingroup"
>
> samba-tool group addmembers localgroup 'SAMDOM\user1'
> ERROR(exception): Failed to add members "SAMDOM\user1" to group
> "localgroup" - Unable to find group "localgroup"
>
No, I asked if you were trying it that way and if you were, to try it
the second way.
The only way I get the error you are getting, it to try and add a user
to a group using the domain and user name e.g.
root at dc1:~# samba-tool group addmembers unixgroup "SAMDOM\suser1"
ERROR(exception): Failed to add members "SAMDOM\suser1" to group "unixgroup" - Unable to find "SAMDOM\suser1". Operation cancelled.
File "/usr/local/samba/lib/python2.7/site-packages/samba/netcmd/group.py", line 239, in run
add_members_operation=True)
File "/usr/local/samba/lib/python2.7/site-packages/samba/samdb.py", line 278, in add_remove_group_members
raise Exception('Unable to find "%s". Operation cancelled.' % member)
But if I do it without the domain:
root at dc1:~# samba-tool group addmembers unixgroup suser1
Added members to group unixgroup
Rowland
More information about the samba
mailing list