Insert billiplan code in radacct table during authenticaiton
Hi all, I am using freeradius for AAA of my cable users. Now what I want to do is, insert billiplan code 001 into radacct table during authentication so that I can view online users according to billingplan code. There will be Billingplan field in radcheck table and when users tries to login the script will check the radcheck table and update that billingplan code into radacct table. Is it possible with rlm_perl module? Thank you Bishal
Would a customers billing plan be determined if they sucessfully authenticate? Wouldn't they all then be in the same plan? Sorry, I just don't see your point. Sent from my iPhone On 25 Oct 2008, at 03:26, Bishal <bishal@baayu.com.np> wrote:
Hi all,
I am using freeradius for AAA of my cable users. Now what I want to do is, insert billiplan code 001 into radacct table during authentication so that I can view online users according to billingplan code. There will be Billingplan field in radcheck table and when users tries to login the script will check the radcheck table and update that billingplan code into radacct table. Is it possible with rlm_perl module?
Thank you Bishal
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
I am using freeradius for AAA of my cable users. Now what I want to do is, insert billiplan code 001 into radacct table during authentication so that I can view online users according to billingplan code. There will be Billingplan field in radcheck table and when users tries to login the script will check the radcheck table and update that billingplan code into radacct table.
Let's not. Use sql query to view online users with billing plan: SELECT radacct.*,radcheck.Billingplan FROM radacct,radcheck WHERE radacct.AcctStopTime IS NULL (or =0 for older schema) AND radacct.UserName=radcheck.UserName AND radcheck.Attribute='Billingplan' Ivan Kalik Kalik Informatika ISP
Following is my radcheck table format: ------+------+-------------+--------------+ | id | UserName | Attribute | op | Value | CrDate | creator | Usemac | activated | activeDate | status | rate | Type | BillingPlan | TimeToFinish | +------+----------+------------------+----+--------------+---------------------+---------+--------+-----------+---------------------+--------+------+------+-------------+--------------+ | 1272 | bishal | User-Password | == | testpass | 2006-07-28 18:42:58 | bishal | 0 | 0 | 2007-07-22 20:49:17 | 0 | 0 | | 001 | 0 | | 1273 | Hary | User-Password | == | lamp | 2007-08-28 20:443:58 | bishal | 0 | 0 | 2007-08-28 20:443:58 | 0 | 0 | | 002 | 0| ========================================= My scenario is I have two office and each office using same NAS to connect to internet. Office A users: Office B Users bishal Hary stephe Mic john test My question is if Office A support staff want to view the online users then he should not be able to view office B users online. In the same way office B staff should not be able to view Office A users online. I know if I use different NAs then it's possbile. is it possible by using same NAS with the help of mysql? Thank you Bishal On 10/25/2008, "tnt@kalik.net" <tnt@kalik.net> wrote:
I am using freeradius for AAA of my cable users. Now what I want to do is, insert billiplan code 001 into radacct table during authentication so that I can view online users according to billingplan code. There will be Billingplan field in radcheck table and when users tries to login the script will check the radcheck table and update that billingplan code into radacct table.
Let's not. Use sql query to view online users with billing plan:
SELECT radacct.*,radcheck.Billingplan FROM radacct,radcheck WHERE radacct.AcctStopTime IS NULL (or =0 for older schema) AND radacct.UserName=radcheck.UserName AND radcheck.Attribute='Billingplan'
Ivan Kalik Kalik Informatika ISP
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Following is my radcheck table format:
------+------+-------------+--------------+ | id | UserName | Attribute | op | Value | CrDate | creator | Usemac | activated | activeDate | status | rate | Type | BillingPlan | TimeToFinish | +------+----------+------------------+----+--------------+---------------------+---------+--------+-----------+---------------------+--------+------+------+-------------+--------------+ | 1272 | bishal | User-Password | == | testpass | 2006-07-28 18:42:58 | bishal | 0 | 0 | 2007-07-22 20:49:17 | 0 | 0 | | 001 | 0 | | 1273 | Hary | User-Password | == | lamp | 2007-08-28 20:443:58 | bishal | 0 | 0 | 2007-08-28 20:443:58 | 0 | 0 | | 002 | 0| =========================================
My scenario is I have two office and each office using same NAS to connect to internet.
Office A users: Office B Users bishal Hary stephe Mic john test
My question is if Office A support staff want to view the online users then he should not be able to view office B users online. In the same way office B staff should not be able to view Office A users online. I know if I use different NAs then it's possbile. is it possible by using same NAS with the help of mysql?
This is absolutely nothing to do with freeradius. It's user management. Your appication that handles that is suposed to do these things. Simplest way is to extend the query:
Let's not. Use sql query to view online users with billing plan:
SELECT radacct.*,radcheck.Billingplan FROM radacct,radcheck WHERE radacct.AcctStopTime IS NULL (or =0 for older schema) AND radacct.UserName=radcheck.UserName AND radcheck.Attribute='Billingplan'
add AND radcheck.BillingPlan='001' for users from officeA and '002' for users from officeB. Your application will have to know who is the user using it (ie. they will have to log into it). Ivan Kalik Kalik Informatika ISP
Thanks Ivan, by extending my query in mysql it worked. Thanks Bishal On 10/26/2008, "tnt@kalik.net" <tnt@kalik.net> wrote:
Following is my radcheck table format:
------+------+-------------+--------------+ | id | UserName | Attribute | op | Value | CrDate | creator | Usemac | activated | activeDate | status | rate | Type | BillingPlan | TimeToFinish | +------+----------+------------------+----+--------------+---------------------+---------+--------+-----------+---------------------+--------+------+------+-------------+--------------+ | 1272 | bishal | User-Password | == | testpass | 2006-07-28 18:42:58 | bishal | 0 | 0 | 2007-07-22 20:49:17 | 0 | 0 | | 001 | 0 | | 1273 | Hary | User-Password | == | lamp | 2007-08-28 20:443:58 | bishal | 0 | 0 | 2007-08-28 20:443:58 | 0 | 0 | | 002 | 0| =========================================
My scenario is I have two office and each office using same NAS to connect to internet.
Office A users: Office B Users bishal Hary stephe Mic john test
My question is if Office A support staff want to view the online users then he should not be able to view office B users online. In the same way office B staff should not be able to view Office A users online. I know if I use different NAs then it's possbile. is it possible by using same NAS with the help of mysql?
This is absolutely nothing to do with freeradius. It's user management. Your appication that handles that is suposed to do these things. Simplest way is to extend the query:
Let's not. Use sql query to view online users with billing plan:
SELECT radacct.*,radcheck.Billingplan FROM radacct,radcheck WHERE radacct.AcctStopTime IS NULL (or =0 for older schema) AND radacct.UserName=radcheck.UserName AND radcheck.Attribute='Billingplan'
add AND radcheck.BillingPlan='001' for users from officeA and '002' for users from officeB. Your application will have to know who is the user using it (ie. they will have to log into it).
Ivan Kalik Kalik Informatika ISP
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On Sun, Oct 26, 2008 at 4:12 AM, Bishal <bishal@baayu.com.np> wrote:
Following is my radcheck table format:
------+------+-------------+--------------+ | id | UserName | Attribute | op | Value | CrDate | creator | Usemac | activated | activeDate | status | rate | Type | BillingPlan | TimeToFinish |
+------+----------+------------------+----+--------------+---------------------+---------+--------+-----------+---------------------+--------+------+------+-------------+--------------+ | 1272 | bishal | User-Password | == | testpass | 2006-07-28 18:42:58 | bishal | 0 | 0 | 2007-07-22 20:49:17 | 0 | 0 | | 001 | 0 | | 1273 | Hary | User-Password | == | lamp | 2007-08-28 20:443:58 | bishal | 0 | 0 | 2007-08-28 20:443:58 | 0 | 0 | | 002 | 0| =========================================
Yickes! Why would anyone torture radcheck table like that? :-) I'm curious to know which management application you are using if it's ok for you to let us know. Regards, Liran.
Hi Liran, I have developed my own php based online viewing gui interface. Bishal On 10/27/2008, "liran tal" <liransgarage@gmail.com> wrote:
On Sun, Oct 26, 2008 at 4:12 AM, Bishal <bishal@baayu.com.np> wrote:
Following is my radcheck table format:
------+------+-------------+--------------+ | id | UserName | Attribute | op | Value | CrDate | creator | Usemac | activated | activeDate | status | rate | Type | BillingPlan | TimeToFinish |
+------+----------+------------------+----+--------------+---------------------+---------+--------+-----------+---------------------+--------+------+------+-------------+--------------+ | 1272 | bishal | User-Password | == | testpass | 2006-07-28 18:42:58 | bishal | 0 | 0 | 2007-07-22 20:49:17 | 0 | 0 | | 001 | 0 | | 1273 | Hary | User-Password | == | lamp | 2007-08-28 20:443:58 | bishal | 0 | 0 | 2007-08-28 20:443:58 | 0 | 0 | | 002 | 0| =========================================
Yickes! Why would anyone torture radcheck table like that? :-)
I'm curious to know which management application you are using if it's ok for you to let us know.
Regards, Liran.
Hey Bishal, On Mon, Oct 27, 2008 at 5:08 PM, Bishal <bishal@baayu.com.np> wrote:
Hi Liran,
I have developed my own php based online viewing gui interface.
That's somewhat sad for me to hear as I do believe that daloRADIUS is a great platform or at least honestly trying to be with a whole lot of effort that I put into it. Unless ofcourse you have developed it 2 years ago, which is when I started the daloRADIUS project too for the lack of proper management platform, in which case I symphatize with you. http://www.daloradius.com http://daloradius.sourceforge.net/ Regards, Liran.
Bishal
On 10/27/2008, "liran tal" <liransgarage@gmail.com> wrote:
On Sun, Oct 26, 2008 at 4:12 AM, Bishal <bishal@baayu.com.np> wrote:
Following is my radcheck table format:
------+------+-------------+--------------+ | id | UserName | Attribute | op | Value | CrDate | creator | Usemac | activated | activeDate | status | rate | Type | BillingPlan | TimeToFinish |
+------+----------+------------------+----+--------------+---------------------+---------+--------+-----------+---------------------+--------+------+------+-------------+--------------+
| 1272 | bishal | User-Password | == | testpass | 2006-07-28 18:42:58 | bishal | 0 | 0 | 2007-07-22 20:49:17 | 0 | 0 | | 001 | 0 | | 1273 | Hary | User-Password | == | lamp | 2007-08-28 20:443:58 | bishal | 0 | 0 | 2007-08-28 20:443:58 | 0 | 0 | | 002 | 0| =========================================
Yickes! Why would anyone torture radcheck table like that? :-)
I'm curious to know which management application you are using if it's ok for you to let us know.
Regards, Liran.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
participants (4)
-
Anders Holm -
Bishal -
liran tal -
tnt@kalik.net