[Samba] Password change via samba-tool: encoding issue
Sergio Rizzi
sergio.rizzi at labs.it
Wed Mar 26 04:02:18 MDT 2014
On 24/03/14 17:09, Sergio Rizzi wrote:
> On 24/03/2014 17:00, Chan Min Wai wrote:
>> Just to ask
>>
>> Care to try
>>
>> samba-tool user setpassword foo
>>
>> and type the password in command line?
>>
>> Your "�" seem to be not supported... as password
>
> Using keyboard input seems to work.
>
> How to fix using --newpassword ?
Maybe using expect?
>> On 20/03/2014 15:13, Sergio Rizzi wrote:
>>
>> root at samba4dc:~# samba-tool user setpassword "foo"
>> --newpassword="�"
>> ERROR: Failed to set password for user 'foo': 'utf8' codec can't
>> decode
>> byte 0xa8 in position 1: invalid start byte
>> File
>>
>> "/usr/local/samba-4.1.6/lib/__python2.7/site-packages/samba/__netcmd/user.py",
>>
>> line 586, in run
>> username=username)
>> File
>>
>> "/usr/local/samba-4.1.6/lib/__python2.7/site-packages/samba/__samdb.py",
>> line 476, in setpassword
>> pw = unicode('"' + password + '"',
>> 'utf-8').encode('utf-16-le')
>>
More information about the samba
mailing list