<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'><div dir='ltr'>
I checked the kamctl script and saw this, in the section to add users<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if [ "$STORE_PLAINTEXT_PW" = "1" ] ; then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PASS="$2"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PASS=""<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fi<br><br>so I went to the kamctltc file and see this option: STORE_PLAINTEXT_PW, which was using default values, hence saving passwds as clear text:<br>I set it to 0 and now it is fine. Problem fixed.<br><br>## do (1) or don't (0) store plaintext passwords<br>## in the subscriber table - default '1'<br>STORE_PLAINTEXT_PW=0<br><br><br><div>
<div>&nbsp;txs a lot<br></div></div>fborot<br><br><div><hr id="stopSpelling">From: fborot@hotmail.com<br>To: sr-users@lists.sip-router.org<br>Subject: RE: auth_db question<br>Date: Fri, 1 Jul 2011 22:06:30 -0400<br><br>

<meta http-equiv="Content-Type" content="text/html; charset=unicode">
<meta name="Generator" content="Microsoft SafeHTML">
<style>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}

</style>

<div dir="ltr">Thank you klaus, what you say makes sense, but I was under the impression that it could be set from the config file, I will take a look at the kamctl script<br><br><hr>From: fborot@hotmail.com<br>To: sr-users@lists.sip-router.org<br>Subject: RE: auth_db question<br>Date: Fri, 1 Jul 2011 14:55:52 -0400<br><br><style>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}
</style>

<div dir="ltr">
I just tried and the phones register but I still see the password on the password column as clear text. <br><br>modparam("auth_db", "db_url", DBURL)<br>modparam("auth_db", "calculate_ha1", 0)<br>modparam("auth_db", "password_column", "ha1")<br>modparam("auth_db", "load_credentials", "")<br>modparam("auth_db", "use_domain", MULTIDOMAIN)<br><pre class="ecxprogramlisting">I create the users like this:<br><br>kamctl add 300 abc<br><br></pre><br><br><div>
<div>&nbsp;</div></div><br><br><div><hr id="ecxstopSpelling">From: fborot@hotmail.com<br>To: sr-users@lists.sip-router.org<br>Subject: auth_db question<br>Date: Fri, 1 Jul 2011 14:36:21 -0400<br><br>



<style>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}
</style>

<div dir="ltr">
Hello<br>I am trying to store the password on the subscriber db as encrypted instead of plain text and when I do it then the registration fails,<br><br>modparam("auth_db", "db_url", DBURL)<br>modparam("auth_db", "calculate_ha1", yes)<br>modparam("auth_db", "password_column", "ha1")<br>modparam("auth_db", "load_credentials", "")<br>modparam("auth_db", "use_domain", MULTIDOMAIN)<br><br>If I change the 3rd line to this it works but it shows the password in clear text:<br><br>modparam("auth_db", "password_column", "password")<br><br>This is how my subscriber table is defined<br><br>mysql&gt; describe subscriber;<br>+---------------+------------------+------+-----+---------+----------------+<br>| Field&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | Type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | Null | Key | Default | Extra&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<br>+---------------+------------------+------+-----+---------+----------------+<br>| id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | int(10) unsigned | NO&nbsp;&nbsp; | PRI | NULL&nbsp;&nbsp;&nbsp; | auto_increment |<br>| username&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | varchar(64)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | NO&nbsp;&nbsp; | MUL |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<br>| domain&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | varchar(64)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | NO&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<br>| rpid&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | varchar(64)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | YES&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp; | NULL&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<br>+---------------+------------------+------+-----+---------+----------------+<br><br>and this is how it looks like in the db:<br><br>[root@registrar ~]# /usr/local/kamailio-3.1/sbin/kamctl db show subscriber<br>+----+----------+---------------+----------+---------------+----------------------------------+----------------------------------+------+<br>| id | username | domain&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | password | email_address | ha1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | ha1b&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | rpid |<br>+----+----------+---------------+----------+---------------+----------------------------------+----------------------------------+------+<br>|&nbsp; 1 | 100&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 192.168.169.1 | abc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 4a169916d58247f9e7eac55251fa7467 | 28787e5b5d3a2c6e2e0a80d3e9e3c6de | NULL |<br>|&nbsp; 2 | 200&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 192.168.169.1 | abc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 0b15f8f9e348ec64a2e7d5fca6b629c3 | 99eea8b456956d67e7915ed9c96e420b | NULL |<br>+----+----------+---------------+----------+---------------+----------------------------------+----------------------------------+------+<br><br>please give me hand figuring this one out, I can't see what I am doing wrong<br><br>fborot<br><br><br><br><br><br><div>
<div>&nbsp;<br><br></div></div>                                               </div></div>                                               </div>
                                               </div></div>                                               </div></body>
</html>