Hello 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,
modparam("auth_db", "db_url", DBURL) modparam("auth_db", "calculate_ha1", yes) modparam("auth_db", "password_column", "ha1") modparam("auth_db", "load_credentials", "") modparam("auth_db", "use_domain", MULTIDOMAIN)
If I change the 3rd line to this it works but it shows the password in clear text:
modparam("auth_db", "password_column", "password")
This is how my subscriber table is defined
mysql> describe subscriber; +---------------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +---------------+------------------+------+-----+---------+----------------+ | id | int(10) unsigned | NO | PRI | NULL | auto_increment | | username | varchar(64) | NO | MUL | | | | domain | varchar(64) | NO | | | | | password | varchar(25) | NO | | | | | email_address | varchar(64) | NO | | | | | ha1 | varchar(64) | NO | | | | | ha1b | varchar(64) | NO | | | | | rpid | varchar(64) | YES | | NULL | | +---------------+------------------+------+-----+---------+----------------+
and this is how it looks like in the db:
[root@registrar ~]# /usr/local/kamailio-3.1/sbin/kamctl db show subscriber +----+----------+---------------+----------+---------------+----------------------------------+----------------------------------+------+ | id | username | domain | password | email_address | ha1 | ha1b | rpid | +----+----------+---------------+----------+---------------+----------------------------------+----------------------------------+------+ | 1 | 100 | 192.168.169.1 | abc | | 4a169916d58247f9e7eac55251fa7467 | 28787e5b5d3a2c6e2e0a80d3e9e3c6de | NULL | | 2 | 200 | 192.168.169.1 | abc | | 0b15f8f9e348ec64a2e7d5fca6b629c3 | 99eea8b456956d67e7915ed9c96e420b | NULL | +----+----------+---------------+----------+---------------+----------------------------------+----------------------------------+------+
please give me hand figuring this one out, I can't see what I am doing wrong
fborot
I just tried and the phones register but I still see the password on the password column as clear text.
modparam("auth_db", "db_url", DBURL) modparam("auth_db", "calculate_ha1", 0) modparam("auth_db", "password_column", "ha1") modparam("auth_db", "load_credentials", "") modparam("auth_db", "use_domain", MULTIDOMAIN) I create the users like this:
kamctl add 300 abc
From: fborot@hotmail.com To: sr-users@lists.sip-router.org Subject: auth_db question Date: Fri, 1 Jul 2011 14:36:21 -0400
Hello 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,
modparam("auth_db", "db_url", DBURL) modparam("auth_db", "calculate_ha1", yes) modparam("auth_db", "password_column", "ha1") modparam("auth_db", "load_credentials", "") modparam("auth_db", "use_domain", MULTIDOMAIN)
If I change the 3rd line to this it works but it shows the password in clear text:
modparam("auth_db", "password_column", "password")
This is how my subscriber table is defined
mysql> describe subscriber; +---------------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +---------------+------------------+------+-----+---------+----------------+ | id | int(10) unsigned | NO | PRI | NULL | auto_increment | | username | varchar(64) | NO | MUL | | | | domain | varchar(64) | NO | | | | | password | varchar(25) | NO | | | | | email_address | varchar(64) | NO | | | | | ha1 | varchar(64) | NO | | | | | ha1b | varchar(64) | NO | | | | | rpid | varchar(64) | YES | | NULL | | +---------------+------------------+------+-----+---------+----------------+
and this is how it looks like in the db:
[root@registrar ~]# /usr/local/kamailio-3.1/sbin/kamctl db show subscriber +----+----------+---------------+----------+---------------+----------------------------------+----------------------------------+------+ | id | username | domain | password | email_address | ha1 | ha1b | rpid | +----+----------+---------------+----------+---------------+----------------------------------+----------------------------------+------+ | 1 | 100 | 192.168.169.1 | abc | | 4a169916d58247f9e7eac55251fa7467 | 28787e5b5d3a2c6e2e0a80d3e9e3c6de | NULL | | 2 | 200 | 192.168.169.1 | abc | | 0b15f8f9e348ec64a2e7d5fca6b629c3 | 99eea8b456956d67e7915ed9c96e420b | NULL | +----+----------+---------------+----------+---------------+----------------------------------+----------------------------------+------+
please give me hand figuring this one out, I can't see what I am doing wrong
fborot
If there is a clear text password in the database does not depend on the Kamailio configuration. In your case it is the kamctl tool:
kamctl will fill both columns, password with the cleartext password and ha1 with the hash.
Thus, either provision the subscriber table manually or modify kamctl to not write the cleartext password into the table.
regards klaus
Am 01.07.2011 20:55, schrieb Fabian Borot:
I just tried and the phones register but I still see the password on the password column as clear text.
modparam("auth_db", "db_url", DBURL) modparam("auth_db", "calculate_ha1", 0) modparam("auth_db", "password_column", "ha1") modparam("auth_db", "load_credentials", "") modparam("auth_db", "use_domain", MULTIDOMAIN)
I create the users like this:
kamctl add 300 abc
From: fborot@hotmail.com To: sr-users@lists.sip-router.org Subject: auth_db question Date: Fri, 1 Jul 2011 14:36:21 -0400
Hello 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,
modparam("auth_db", "db_url", DBURL) modparam("auth_db", "calculate_ha1", yes) modparam("auth_db", "password_column", "ha1") modparam("auth_db", "load_credentials", "") modparam("auth_db", "use_domain", MULTIDOMAIN)
If I change the 3rd line to this it works but it shows the password in clear text:
modparam("auth_db", "password_column", "password")
This is how my subscriber table is defined
mysql> describe subscriber; +---------------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +---------------+------------------+------+-----+---------+----------------+ | id | int(10) unsigned | NO | PRI | NULL | auto_increment | | username | varchar(64) | NO | MUL | | | | domain | varchar(64) | NO | | | | | password | varchar(25) | NO | | | | | email_address | varchar(64) | NO | | | | | ha1 | varchar(64) | NO | | | | | ha1b | varchar(64) | NO | | | | | rpid | varchar(64) | YES | | NULL | | +---------------+------------------+------+-----+---------+----------------+
and this is how it looks like in the db:
[root@registrar ~]# /usr/local/kamailio-3.1/sbin/kamctl db show subscriber +----+----------+---------------+----------+---------------+----------------------------------+----------------------------------+------+ | id | username | domain | password | email_address | ha1 | ha1b | rpid | +----+----------+---------------+----------+---------------+----------------------------------+----------------------------------+------+ | 1 | 100 | 192.168.169.1 | abc | | 4a169916d58247f9e7eac55251fa7467 | 28787e5b5d3a2c6e2e0a80d3e9e3c6de | NULL | | 2 | 200 | 192.168.169.1 | abc | | 0b15f8f9e348ec64a2e7d5fca6b629c3 | 99eea8b456956d67e7915ed9c96e420b | NULL | +----+----------+---------------+----------+---------------+----------------------------------+----------------------------------+------+
please give me hand figuring this one out, I can't see what I am doing wrong
fborot
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
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
From: fborot@hotmail.com To: sr-users@lists.sip-router.org Subject: RE: auth_db question Date: Fri, 1 Jul 2011 14:55:52 -0400
I just tried and the phones register but I still see the password on the password column as clear text.
modparam("auth_db", "db_url", DBURL) modparam("auth_db", "calculate_ha1", 0) modparam("auth_db", "password_column", "ha1") modparam("auth_db", "load_credentials", "") modparam("auth_db", "use_domain", MULTIDOMAIN) I create the users like this:
kamctl add 300 abc
From: fborot@hotmail.com To: sr-users@lists.sip-router.org Subject: auth_db question Date: Fri, 1 Jul 2011 14:36:21 -0400
Hello 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,
modparam("auth_db", "db_url", DBURL) modparam("auth_db", "calculate_ha1", yes) modparam("auth_db", "password_column", "ha1") modparam("auth_db", "load_credentials", "") modparam("auth_db", "use_domain", MULTIDOMAIN)
If I change the 3rd line to this it works but it shows the password in clear text:
modparam("auth_db", "password_column", "password")
This is how my subscriber table is defined
mysql> describe subscriber; +---------------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +---------------+------------------+------+-----+---------+----------------+ | id | int(10) unsigned | NO | PRI | NULL | auto_increment | | username | varchar(64) | NO | MUL | | | | domain | varchar(64) | NO | | | | | password | varchar(25) | NO | | | | | email_address | varchar(64) | NO | | | | | ha1 | varchar(64) | NO | | | | | ha1b | varchar(64) | NO | | | | | rpid | varchar(64) | YES | | NULL | | +---------------+------------------+------+-----+---------+----------------+
and this is how it looks like in the db:
[root@registrar ~]# /usr/local/kamailio-3.1/sbin/kamctl db show subscriber +----+----------+---------------+----------+---------------+----------------------------------+----------------------------------+------+ | id | username | domain | password | email_address | ha1 | ha1b | rpid | +----+----------+---------------+----------+---------------+----------------------------------+----------------------------------+------+ | 1 | 100 | 192.168.169.1 | abc | | 4a169916d58247f9e7eac55251fa7467 | 28787e5b5d3a2c6e2e0a80d3e9e3c6de | NULL | | 2 | 200 | 192.168.169.1 | abc | | 0b15f8f9e348ec64a2e7d5fca6b629c3 | 99eea8b456956d67e7915ed9c96e420b | NULL | +----+----------+---------------+----------+---------------+----------------------------------+----------------------------------+------+
please give me hand figuring this one out, I can't see what I am doing wrong
fborot
I checked the kamctl script and saw this, in the section to add users
if [ "$STORE_PLAINTEXT_PW" = "1" ] ; then PASS="$2" else PASS="" fi
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: I set it to 0 and now it is fine. Problem fixed.
## do (1) or don't (0) store plaintext passwords ## in the subscriber table - default '1' STORE_PLAINTEXT_PW=0
txs a lot fborot
From: fborot@hotmail.com To: sr-users@lists.sip-router.org Subject: RE: auth_db question Date: Fri, 1 Jul 2011 22:06:30 -0400
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
From: fborot@hotmail.com To: sr-users@lists.sip-router.org Subject: RE: auth_db question Date: Fri, 1 Jul 2011 14:55:52 -0400
I just tried and the phones register but I still see the password on the password column as clear text.
modparam("auth_db", "db_url", DBURL) modparam("auth_db", "calculate_ha1", 0) modparam("auth_db", "password_column", "ha1") modparam("auth_db", "load_credentials", "") modparam("auth_db", "use_domain", MULTIDOMAIN) I create the users like this:
kamctl add 300 abc
From: fborot@hotmail.com To: sr-users@lists.sip-router.org Subject: auth_db question Date: Fri, 1 Jul 2011 14:36:21 -0400
Hello 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,
modparam("auth_db", "db_url", DBURL) modparam("auth_db", "calculate_ha1", yes) modparam("auth_db", "password_column", "ha1") modparam("auth_db", "load_credentials", "") modparam("auth_db", "use_domain", MULTIDOMAIN)
If I change the 3rd line to this it works but it shows the password in clear text:
modparam("auth_db", "password_column", "password")
This is how my subscriber table is defined
mysql> describe subscriber; +---------------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +---------------+------------------+------+-----+---------+----------------+ | id | int(10) unsigned | NO | PRI | NULL | auto_increment | | username | varchar(64) | NO | MUL | | | | domain | varchar(64) | NO | | | | | password | varchar(25) | NO | | | | | email_address | varchar(64) | NO | | | | | ha1 | varchar(64) | NO | | | | | ha1b | varchar(64) | NO | | | | | rpid | varchar(64) | YES | | NULL | | +---------------+------------------+------+-----+---------+----------------+
and this is how it looks like in the db:
[root@registrar ~]# /usr/local/kamailio-3.1/sbin/kamctl db show subscriber +----+----------+---------------+----------+---------------+----------------------------------+----------------------------------+------+ | id | username | domain | password | email_address | ha1 | ha1b | rpid | +----+----------+---------------+----------+---------------+----------------------------------+----------------------------------+------+ | 1 | 100 | 192.168.169.1 | abc | | 4a169916d58247f9e7eac55251fa7467 | 28787e5b5d3a2c6e2e0a80d3e9e3c6de | NULL | | 2 | 200 | 192.168.169.1 | abc | | 0b15f8f9e348ec64a2e7d5fca6b629c3 | 99eea8b456956d67e7915ed9c96e420b | NULL | +----+----------+---------------+----------+---------------+----------------------------------+----------------------------------+------+
please give me hand figuring this one out, I can't see what I am doing wrong
fborot