[Pkg-samba-maint] Bug#931411: samba-common-bin: samba-tool user create error with unicode characters in the names

Mathieu Parent math.parent at gmail.com
Sun Jul 7 09:32:56 BST 2019

Control: tag + confirmed upstream fixed-upstream

Le jeu. 4 juil. 2019 à 11:54, Pisch Tamás <pischta at gmail.com> a écrit :
> Package: samba-common-bin
> Version: 2:4.9.5+dfsg-5
> Severity: normal
> Dear Maintainer,


> when I give the command, for example
> samba-tool user create test pwd --surname Vezetéknév --givenname Keresztnév
> I get the following error message:
> ERROR(<type 'exceptions.UnicodeDecodeError'>): Failed to add user
> 'teszttanar3':  - 'ascii' codec can't decode byte 0xc3 in position 16:
> ordinal not in range(128)
>   File "/usr/lib/python2.7/dist-packages/samba/netcmd/user.py", line 425, in run
>     smartcard_required=smartcard_required)
>   File "/usr/lib/python2.7/dist-packages/samba/samdb.py", line 490, in newuser
>     force_password_change_at_next_login_req)
>   File "/usr/lib/python2.7/dist-packages/samba/samdb.py", line 606, in
> setpassword
>     """ % (user_dn, base64.b64encode(pw).decode('utf-8'))
> On the Samba list, somebody suggested to use newer Samba version,
> because it is improved. Samba 4.10 can (or in default?) uses python3,
> and with it, I could use unicode
> characters. Ok, but I would like to use Debian 10, with official packages.

Your error is on the password. Could you try this patch:


Mathieu Parent

More information about the Pkg-samba-maint mailing list