[Samba] unicode characters in samba-tool user names

Pisch Tamás pischta at gmail.com
Wed Jun 26 06:16:42 UTC 2019


I would like to add users with unicode characters in their names (not
in username, but in --surname, and in --given-name). I get the
following error message:
ERROR(<type 'exceptions.UnicodeDecodeError'>): Failed to add user
'testuser':  - '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
  File "/usr/lib/python2.7/dist-packages/samba/samdb.py", line 490, in newuser
  File "/usr/lib/python2.7/dist-packages/samba/samdb.py", line 606, in
    """ % (user_dn, base64.b64encode(pw).decode('utf-8'))
I tested it on Debian 10, with Samba 4.9.5.
I found some closed bug reports, where occured similar error, and
according to that reports, the problem is python2. Samba 4.10 has full
python3 support, but I don't want to compile Samba from source. Is
there another way I avoid that error?

More information about the samba mailing list