[Samba] samba-tool and --given-name or --surname format?

Harald Hannelius harald+samba at arcada.fi
Thu May 14 10:24:06 UTC 2020

How do I add a user with samba-tool that has the givenname "Åke" or surname 

# samba-tool user create foobar 21asdasd// --given-name="Åke"
ERROR(<type 'exceptions.UnicodeDecodeError'>): Failed to add user 'foobar': - 
'ascii' codec can't decode byte 0xc3 in position 8: ordinal not in range(128)
   File "/usr/lib/python2.7/dist-packages/samba/netcmd/user.py", line 425, in 
   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'))

# samba-tool user create foobar 21asdasd// --given-name="$(echo "Åke"|openssl 
ERROR(ldb): Failed to add user 'foobar':  - ldb_add: invalid dn '(null)'

What's the correct format of names?


Harald Hannelius | harald.hannelius/a\arcada.fi | +358 50 594 1020

More information about the samba mailing list