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
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
Good morning Guys, Yes, i can confirm that, i just tested 4.11.4, no problems. Greetz, Louis> -----Oorspronkelijk bericht----- > Van: samba [mailto:samba-bounces at lists.samba.org] Namens > Rowland penny via samba > Verzonden: vrijdag 3 januari 2020 10:24 > Aan: samba at lists.samba.org > Onderwerp: Re: [Samba] samba-tool user syncpasswords 4.10 bug > > 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 > > > > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba > >
Thank you, good to know. Peter Am 2020-01-03 um 10:31 schrieb L.P.H. van Belle via samba:> Good morning Guys, > > Yes, i can confirm that, i just tested 4.11.4, no problems. > > Greetz, > > Louis > > >> -----Oorspronkelijk bericht----- >> Van: samba [mailto:samba-bounces at lists.samba.org] Namens >> Rowland penny via samba >> Verzonden: vrijdag 3 januari 2020 10:24 >> Aan: samba at lists.samba.org >> Onderwerp: Re: [Samba] samba-tool user syncpasswords 4.10 bug >> >> 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=6e8c3ae6e9be > 38fdd1d1693b93c8629391799b19 >> >> Rowland >> >> >> >> -- >> To unsubscribe from this list go to the following URL and read the >> instructions: https://lists.samba.org/mailman/options/samba >> >> > >