Thanks Ivan, by extending my query in mysql it worked. Thanks Bishal
On 10/26/2008, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> 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 > > - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html