Web lists-archives.com

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




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


root@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@ad1:~$ samba-tool --version
4.9.1


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


Bjoern

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba