How to extract passwords from the subscriber table?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

How to extract passwords from the subscriber table?

Tiberiu Breana
Hello.

I want to use some custom RADIUS authentication requests with radius_send_auth, but it seems this can't work without sending the user's password.
I'm trying to extract user passwords from the subscriber table using the example from the avpops manual:

avp_db_query("select password from subscriber where username='$tu'", "$avp(i:678)");

But I get this error:

ERROR:avpops:fixup_db_query_avp: no db url defined to be used by this function
ERROR:core:fix_actions: fixing failed (code=-6) at cfg line 308
ERROR:core:main: failed to fix configuration with err code -6

I guess I need to add a db_url ID to the query's parameters, but I don't know what the subscriber table's ID is. What is it? Or, how can I set it?
Is there a simpler way to obtain a user's password and put it in a variable?


Regards,
Tiberiu

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: How to extract passwords from the subscriber table?

Max Mühlbronner
Hello,

the avpops is missing the db connection / db_url modparam.

http://www.opensips.org/html/docs/modules/devel/avpops.html#id249134

modparam("avpops","db_url","mysql://user:passwd@host/database")



Best Regards


Max M.

Am 14.06.2011 17:02, schrieb Tiberiu Breana:
Hello.

I want to use some custom RADIUS authentication requests with radius_send_auth, but it seems this can't work without sending the user's password.
I'm trying to extract user passwords from the subscriber table using the example from the avpops manual:

avp_db_query("select password from subscriber where username='$tu'", "$avp(i:678)");

But I get this error:

ERROR:avpops:fixup_db_query_avp: no db url defined to be used by this function
ERROR:core:fix_actions: fixing failed (code=-6) at cfg line 308
ERROR:core:main: failed to fix configuration with err code -6

I guess I need to add a db_url ID to the query's parameters, but I don't know what the subscriber table's ID is. What is it? Or, how can I set it?
Is there a simpler way to obtain a user's password and put it in a variable?


Regards,
Tiberiu
_______________________________________________ Users mailing list [hidden email] http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: How to extract passwords from the subscriber table?

Tiberiu Breana
I know that, but how can I connect to the subscriber table (the default "user list")? It's not a mysql db.
I don't have a persistent database configured right now. Do I need to configure one if I want to use avp_db_query?

Thanks.

On 15 June 2011 13:35, Max Mühlbronner <[hidden email]> wrote:
Hello,

the avpops is missing the db connection / db_url modparam.

http://www.opensips.org/html/docs/modules/devel/avpops.html#id249134

modparam("avpops","db_url","mysql://user:passwd@host/database")



Best Regards


Max M.

Am 14.06.2011 17:02, schrieb Tiberiu Breana:
Hello.

I want to use some custom RADIUS authentication requests with radius_send_auth, but it seems this can't work without sending the user's password.
I'm trying to extract user passwords from the subscriber table using the example from the avpops manual:

avp_db_query("select password from subscriber where username='$tu'", "$avp(i:678)");

But I get this error:

ERROR:avpops:fixup_db_query_avp: no db url defined to be used by this function
ERROR:core:fix_actions: fixing failed (code=-6) at cfg line 308
ERROR:core:main: failed to fix configuration with err code -6

I guess I need to add a db_url ID to the query's parameters, but I don't know what the subscriber table's ID is. What is it? Or, how can I set it?
Is there a simpler way to obtain a user's password and put it in a variable?


Regards,
Tiberiu
_______________________________________________ Users mailing list [hidden email] http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: How to extract passwords from the subscriber table?

Max Mühlbronner
Hello,


the avp_db_query needs a db/connection to query.

But what kind of db is the "internal" db , how did you add the users?

If i remember correctly adding users via opensipsctl does always write to a database (which is configured in opensipsctlrc file)? If there is no connection how did you add the users? But maybe i am missing something?



Best Regards

Max M.

Am 15.06.2011 13:07, schrieb Tiberiu Breana:
I know that, but how can I connect to the subscriber table (the default "user list")? It's not a mysql db.
I don't have a persistent database configured right now. Do I need to configure one if I want to use avp_db_query?

Thanks.

On 15 June 2011 13:35, Max Mühlbronner <[hidden email]> wrote:
Hello,

the avpops is missing the db connection / db_url modparam.

http://www.opensips.org/html/docs/modules/devel/avpops.html#id249134

modparam("avpops","db_url","mysql://user:passwd@host/database")



Best Regards


Max M.

Am 14.06.2011 17:02, schrieb Tiberiu Breana:
Hello.

I want to use some custom RADIUS authentication requests with radius_send_auth, but it seems this can't work without sending the user's password.
I'm trying to extract user passwords from the subscriber table using the example from the avpops manual:

avp_db_query("select password from subscriber where username='$tu'", "$avp(i:678)");

But I get this error:

ERROR:avpops:fixup_db_query_avp: no db url defined to be used by this function
ERROR:core:fix_actions: fixing failed (code=-6) at cfg line 308
ERROR:core:main: failed to fix configuration with err code -6

I guess I need to add a db_url ID to the query's parameters, but I don't know what the subscriber table's ID is. What is it? Or, how can I set it?
Is there a simpler way to obtain a user's password and put it in a variable?


Regards,
Tiberiu
_______________________________________________ Users mailing list [hidden email] http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________ Users mailing list [hidden email] http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: How to extract passwords from the subscriber table?

Tiberiu Breana

But what kind of db is the "internal" db , how did you add the users?

That's what I was trying to find out :). I don't know where the 'subscriber' table (that's used for digest auth) is located or what kind of db it is. Maybe it's in /share/opensips/dbtext/opensips/subscriber, but I've tried adding that to the URL (as text://) but it didn't work.

I'm trying to configure my own MySQL db now and try to work with that.
Thanks for your replies.


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users