[Samba] samba-tool user create, python, exceptions.UnicodeDecodeError

Bjoern Trimborn samba at bjoern-trimborn.de
Tue Nov 6 19:02:15 UTC 2018


short question is it a known "bug?" that samba-tool doesn't like umlauts
in the user option?


root at ad1:~/$ samba-tool user create max.mustermann cD4L7gSv
--given-name=Max --surname=Mustermann,
--userou="OU=Schüler,OU=Benutzer,OU=Marien Schule"
--profile-path=%logonserver%\\dfs\\profiles_windows\\%username%
--use-username-as-cn --must-change-at-next-login

---
ERROR(<type 'exceptions.UnicodeDecodeError'>): Failed to add user
'max.mustermann':  - 'ascii' codec can't decode byte 0xc3 in position
24: ordinal not in range(128)
  File "/usr/lib/python2.7/dist-packages/samba/netcmd/user.py", line
383, 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'))
---

root at ad1:~$ samba-tool --version
4.9.1


after renaming the ou from "Schüler" to "Students" it works as expected.


Bjoern



More information about the samba mailing list