From 104582b73caf008600e15d76d57424263a0f28d4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B6rn=20Baumbach?= Date: Wed, 26 Feb 2020 13:55:01 +0100 Subject: [PATCH] samba-tool group delete: use binary encoded group name MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Allows to delete groups with names like e.g. 'group1 (xy)'. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14296 Signed-off-by: Björn Baumbach Reviewed-by: Andrew Bartlett --- python/samba/netcmd/group.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/samba/netcmd/group.py b/python/samba/netcmd/group.py index f0af886a58e..c063657a5ae 100644 --- a/python/samba/netcmd/group.py +++ b/python/samba/netcmd/group.py @@ -179,7 +179,7 @@ Example2 deletes group Group2 from the local server. The command is run under r credentials=creds, lp=lp) filter = ("(&(sAMAccountName=%s)(objectClass=group))" % - groupname) + ldb.binary_encode(groupname)) try: res = samdb.search(base=samdb.domain_dn(), -- 2.47.2