[Samba] samba-tool user syncpasswords 4.10 bug
🦏 Peter Rindfuss
peter.rindfuss at wzb.eu
Fri Jan 3 08:53:47 UTC 2020
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
More information about the samba
mailing list