Hi Dioris<br><br>Thanks a lot for your tip.<br><br>When I calculated ha1 the first time,I missed the colon between fields. It must be included in the hash.<br><br>Regards<br>DangVinh<br><br><div class="gmail_quote">On Fri, Jul 10, 2009 at 10:40 PM, Bogdan-Andrei Iancu <span dir="ltr"><<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Dioris,<br>
<br>
Could you upload this on the web site (TIPS section) for other people<br>
benefit ? See: <a href="http://www.opensips.org/Resources/Documentation#toc4" target="_blank">http://www.opensips.org/Resources/Documentation#toc4</a><br>
<br>
If you create an account on the web site, you are free to edit the content.<br>
<br>
Thanks and regards,<br>
Bogdan<br>
<div class="im"><br>
<br>
<br>
Dioris Moreno wrote:<br>
> When you change the domain column in the subscriber table, you have to<br>
> recalculate ha1 and ha1b fields. In order to do that you must have the<br>
> password of each subscriber. It is stored in the 'password' column if<br>
> you have set STORE_PLAINTEXT_PW=1 in opensipsctlrc (default).<br>
><br>
> HA1 is a MD5 hash of "username:domain:password". For example, if you<br>
> have created a SIP account <a href="mailto:1000@mydomain.com">1000@mydomain.com</a><br>
</div>> <mailto:<a href="mailto:1000@mydomain.com">1000@mydomain.com</a>> using password 123456, then HA1 is the MD5<br>
> hash of "1000:<a href="http://mydomain.com:123456" target="_blank">mydomain.com:123456</a> <<a href="http://mydomain.com:123456" target="_blank">http://mydomain.com:123456</a>>"<br>
<div class="im">> (without quotes). On the other hand HA1B is the MD5 hash of<br>
> "username@domain:domain:password"; so using the same example above,<br>
> HA1B would be the MD5 hash of "1000@mydomain.com:m<a href="http://ydomain.com:123456" target="_blank">ydomain.com:123456</a><br>
</div>> <<a href="http://ydomain.com:123456" target="_blank">http://ydomain.com:123456</a>>" (without quotes).<br>
<div class="im">><br>
> So, to recalculate and update ha1 and ha1b columns in the subscriber<br>
> table, just execute the following sql statement in mysql:<br>
><br>
> update subscriber<br>
> set ha1 = md5(concat(username, ':', domain, ':', password)),<br>
> ha1b = md5(concat(username, '@', domain, ':', domain, ':', password))<br>
><br>
> I hope this could be useful.<br>
><br>
> Regards,<br>
><br>
> Dioris<br>
><br>
</div>> ------------------------------------------------------------------------<br>
><br>
> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
><br>
<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div><br>