This is not really a bug in smbpasswd, but an encoding-problem.
Example:
>>> import smbpasswd
>>> smbpasswd.nthash('ærlig østen åse')
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 0: ordinal 
not in range(128)
>>> smbpasswd.nthash(u'ærlig østen åse')
'D3A3E9DCF4E6C87491FCC260276C09C9'

>>> s = 'ærlig østen åse'
>>> smbpasswd.nthash(s.decode('latin-1'))
'EA450AC87DAF980DA2F96476E77D428E'

Scripts has to be aware of their own locale, and act accordingly.

-- 
Regards
 
Bjørn Ove Grøtan


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to