[Samba] samba-tool user syncpasswords 4.10 bug

Rowland penny rpenny at samba.org
Fri Jan 3 09:24:08 UTC 2020


On 03/01/2020 08:53, 🦏 Peter Rindfuss via samba wrote:
> Hi,
>
> When I use "samba-tool user syncpasswords" in Samba 4.10.11 (and earlier
> version of 4.10), I get a python exception coming from a place in
> /usr/lib/python3/dist-packages/samba/netcmd/user.py
>
> I could fix it with this patch:
>
> diff user.py.orig user.py
> 2001c2001
> <             reply = sync_command_p.communicate(input)[0]
> ---
>>              reply = sync_command_p.communicate(input.encode('utf-8'))[0]
> 2008c2008
> <             if reply.startswith("DONE-EXIT: "):
> ---
>>              if reply.startswith(bytes("DONE-EXIT: ", 'utf-8')):
>
> As I am not an experienced Python programmer, there may be other solutions.
>
> This bug seems to originate from the differences between Python2 and
> Python3.
>
> Peter
>
Hi Peter, thanks for reporting this, but it seems it has been fixed 
already in git, see here:

https://git.samba.org/?p=samba.git;a=commitdiff;h=6e8c3ae6e9be38fdd1d1693b93c8629391799b19

Rowland





More information about the samba mailing list