<html><head></head><body><div class="gmail_quote">Matthias Nagel <matthias.h.nagel@gmail.com> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">Hello,<br /><br />if a do a "smbencrypt ä" then the output for the NT hash is "B5CF5E386433C7CB69E43ED774717792" but the correct hash would be "3104EAB484D59EFABCEA2C44B07F41D3". (If you do not see the letter: It is a small "a" with two dots, unicode code point 00E4.) Similar results hold for other umlauts, too.<br /><br />My Freeradius version is 2.2.0 running on Linux 3.8.13 with system locale set to en_US.utf8.<br /><br />I wrote an own utitly to calculate NT hashes to fill the Radius database. While I compared the results of my own utility with those from "smbencrypt", I found these discrepancies. In order to check which result was the correct one, I took a Windows computer, added a dummy user to it and set the passwords in concern. Then I extracted the NT hashes from the SAM database.<br /><br />One note of caution: If you take a web site like <a
href="http://www.onlinehashcrack.com/hash-calculator.php">http://www.onlinehashcrack.com/hash-calculator.php</a>, do not trust it. If it comes to non-ASCII letters the output is false, too.<br /><br />Matthias<br /><br /><hr /><br />Matthias Nagel<br />Parkstraße 27<br />76131 Karlsruhe<br /><br />Mobil: +49-151-15998774<br />e-Mail: matthias.h.nagel@gmail.com<br />ICQ: 499797758<br />Skype: nagmat84<br /><br />-<br />List info/subscribe/unsubscribe? See <a href="http://www.freeradius.org/list/users.html">http://www.freeradius.org/list/users.html</a></pre></blockquote></div><br clear="all">Almost certainly. Nt hashes are the 16-bit encoding, and smbencrypt likely treats each byte in the utf8 encoding as on ASCII char and pads it to 16 bits.<br>
<br>
I made some effort to handle this in the mschap password change code, but really the server should probably pull in libiconv for the few places this is needed (such as calculating correct nt hashes). Probably a fairly trivial patch if you feel like it ;o)<br>
-- <br>
Sent from my phone with, please excuse brevity and typos</body></html>