Harald Hannelius
2020-May-14 10:24 UTC
[Samba] samba-tool and --given-name or --surname format?
How do I add a user with samba-tool that has the givenname "?ke" or
surname
"?berg"?
# 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
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'))
# samba-tool user create foobar 21asdasd// --given-name="$(echo
"?ke"|openssl
base64)"
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
Andrew Bartlett
2020-May-14 10:46 UTC
[Samba] samba-tool and --given-name or --surname format?
On Thu, 2020-05-14 at 13:24 +0300, Harald Hannelius via samba wrote:> How do I add a user with samba-tool that has the givenname "?ke" or > surname > "?berg"?The correct method is to use a version of Samba built with python3. My understanding is that we have fixed that issue there, but not in the older versions. Thanks! Andrew Bartlett -- Andrew Bartlett https://samba.org/~abartlet/ Authentication Developer, Samba Team https://samba.org Samba Developer, Catalyst IT https://catalyst.net.nz/services/samba
Harald Hannelius
2020-May-14 11:22 UTC
[Samba] samba-tool and --given-name or --surname format?
On Thu, 14 May 2020, Andrew Bartlett via samba wrote:> On Thu, 2020-05-14 at 13:24 +0300, Harald Hannelius via samba wrote: >> How do I add a user with samba-tool that has the givenname "?ke" or >> surname >> "?berg"? > > The correct method is to use a version of Samba built with python3. My > understanding is that we have fixed that issue there, but not in the > older versions.Thanks! I will have to talk to the Debian-team then, this is the Samba that comes with Debian 10. "Version 4.9.5-Debian". -- Harald Hannelius | harald.hannelius/a\arcada.fi | +358 50 594 1020