RE: (Fwd) RE: (RADIATOR) (Fwd) can i have two accounting tables?
hi Hugh!!! I am sorry about the wrong email address, and I apologize for the inconvience that might have caused to you. well this is what exactly i want to do. We are planning to have two different type of subscription scheme. In the first scheme the subscription is charged on hourly basis while the other one it is based on number of days/months. I want to keep the accounting information for this two types in two different accounting tables. Regards Hakim -Original Message- From: Hugh Irvine [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 17, 2000 4:41 AM To: Hakim Tass; [EMAIL PROTECTED] Subject: Re: (Fwd) RE: (RADIATOR) (Fwd) can i have two accounting tables? Hello Hakim - Could you please send your mail to "[EMAIL PROTECTED]" please (not [EMAIL PROTECTED])? Thanks. hi Hugh!!! I did try that before putting in my question to the mailing list. But some how the accounting is being done in the first AuthBy SQL clause that i mention. I am writing below the snapshot of the configuration file , perhaps i might be making a mistake or missing out on something. For the first two AuthBy SQL clause i want the accounting to be done in accountingtable1 while for the last clause i want the accounting in accountingtable2. (but here the accounting information is going in accountingtable2) Realm MaxSessions 1 AuthByPolicy ContinueWhileReject AuthBy SQL DBSourcedbi:mysql:mydatabase DBUsername DBAuth AuthSelect select PASSWORD,BALANCETIME from AUTHENTICATIONTABLE where \ (USERNAME='%n' and BALANCETIME 0 and (EXPIRY_DATE now() or EXPIRY_DATE IS NULL)) AuthColumnDef 0,Password,check AuthColumnDef 1,Session-Timeout,reply AddToReply Service-Type = Framed,Framed-Protocol = PPP AccountingStopsOnly AccountingTable ACCOUNTINGTABLE1 AcctColumnDef USERNAME,User-Name AcctColumnDef CALLDATE,Timestamp,integer-date AcctColumnDef ACCTSTATUSTYPE,Acct-Status-Type,integer AcctColumnDef ACCTDELAYTIME,Acct-Delay-Time,integer AcctColumnDef ACCTINPUTOCTETS,Acct-Input-Octets,integer AcctColumnDef ACCTOUTPUTOCTETS,Acct-Output-Octets,integer AcctColumnDef ACCTSESSIONID,Acct-Session-Id AcctColumnDef ACCTSESSIONTIME,Acct-Session-Time,integer AcctColumnDef ACCTTERMINATECAUSE,Acct_Terminate-Cause AcctColumnDef NASIDENTIFIER,NAS-Identifier AcctColumnDef NASIDENTIFIER,NAS-IP-Address AcctColumnDef NASPORT,NAS-Port,integer AcctColumnDef CLIENTIPADDRESS,Framed-IP-Address # You can use this to force Radiator to limit # maximum session times to how many minutes # are left in subaccounts.timeleft AcctSQLStatement update AUTHENTICATIONTABLE set BALANCETIME = BALANCETIME-%{Acct-Session-Time} \ where USERNAME = '%n' /AuthBy AuthByPolicy ContinueWhileReject MaxSessions 1 AuthBy SQL #accounting for this authby clause to go in accountingtable1 # Change DBSource, DBUsername, DBAuth for your database # See the reference manual DBSourcedbi:mysql:mydatabase DBUsername DBAuth AuthSelect select PASSWORD,EXPIRY_DATE from UNLIMITED where USERNAME='%n' and (EXPIRY_DATE now() or EXPIRY_DATE is NULL) AuthColumnDef 0,Password,check AddToReply Service-Type = Framed,Framed-Protocol = PPP /AuthBy AuthByPolicy ContinueWhileReject AuthBy SQL DBSource dbi:mysql:mydatabase DBUsername DBAuth AuthSelect select password,balancetime from AUTHENTICATIONTABLE2 where (username='%n' and status = 1) AuthColumnDef0,Password,check AuthColumnDef1,Session-Timeout,Reply AccountingStopsOnly AccountingTable accountingtable2 AcctColumnDef username,User-Name AcctColumnDef calldate,Timestamp,formatted-date,to_date\ ('%e %m %Y %H %M %S','DD MM HH24:MI:SS') AcctColumnDef acctstatustype,Acct-Status-Type,integer AcctColumnDef acctdelaytime,Acct-Delay-Time,integer AcctColumnDef acctinputoctets,Acct-Input-Octets,integer AcctColumnDef acctoutputoctets,Acct-Output-Octets,integer AcctColumnDef acc
RE: (Fwd) RE: (RADIATOR) (Fwd) can i have two accounting tables?
Hello Hakim - On Tue, 17 Oct 2000, Hakim Tass wrote: hi Hugh!!! I am sorry about the wrong email address, and I apologize for the inconvience that might have caused to you. well this is what exactly i want to do. We are planning to have two different type of subscription scheme. In the first scheme the subscription is charged on hourly basis while the other one it is based on number of days/months. I want to keep the accounting information for this two types in two different accounting tables. You would do something like this: # configure SQLAuthentication1 AuthBy SQL Identifier SQLAuthentication1 DBSourcedbi:mysql:mydatabase DBUsername DBAuth AuthSelect select PASSWORD,BALANCETIME from \ AUTHENTICATIONTABLE where \ (USERNAME='%n' and BALANCETIME 0 and \ (EXPIRY_DATE now() or EXPIRY_DATE IS NULL)) AuthColumnDef 0,Password,check AuthColumnDef 1,Session-Timeout,reply AccountingTable /AuthBy #configure SQLAccounting1 AuthBy SQL Identifier SQLAccounting1 DBSourcedbi:mysql:mydatabase DBUsername DBAuth AuthSelect AccountingStopsOnly AccountingTable ACCOUNTINGTABLE1 AcctColumnDef USERNAME,User-Name AcctColumnDef CALLDATE,Timestamp,integer-date AcctColumnDef ACCTSTATUSTYPE,Acct-Status-Type,integer AcctColumnDef ACCTDELAYTIME,Acct-Delay-Time,integer AcctColumnDef ACCTINPUTOCTETS,Acct-Input-Octets,integer AcctColumnDef \ ACCTOUTPUTOCTETS,Acct-Output-Octets,integer AcctColumnDef ACCTSESSIONID,Acct-Session-Id AcctColumnDef ACCTSESSIONTIME,Acct-Session-Time,integer AcctColumnDef ACCTTERMINATECAUSE,Acct_Terminate-Cause AcctColumnDef NASIDENTIFIER,NAS-Identifier AcctColumnDef NASIDENTIFIER,NAS-IP-Address AcctColumnDef NASPORT,NAS-Port,integer AcctColumnDef CLIENTIPADDRESS,Framed-IP-Address # You can use this to force Radiator to limit # maximum session times to how many minutes # are left in subaccounts.timeleft AcctSQLStatement update AUTHENTICATIONTABLE set \ BALANCETIME = BALANCETIME-%{Acct-Session-Time} \ where USERNAME = '%n' /AuthBy # configure SQLAuthentication2 AuthBy SQL Identifier SQLAuthentication2 DBSource dbi:mysql:mydatabase DBUsername DBAuth AuthSelect select password,balancetime from \ AUTHENTICATIONTABLE2 where (username='%n' and status = 1) AuthColumnDef0,Password,check AuthColumnDef1,Session-Timeout,Reply AccountingTable /AuthBy # configure SQLAccounting2 AuthBy SQL Identifier SQLAccounting2 DBSource dbi:mysql:mydatabase DBUsername DBAuth AuthSelect AccountingStopsOnly AccountingTable accountingtable2 AcctColumnDef username,User-Name AcctColumnDef calldate,Timestamp,formatted-date,to_date\ ('%e %m %Y %H %M %S','DD MM HH24:MI:SS') AcctColumnDef acctstatustype,Acct-Status-Type,integer AcctColumnDef acctdelaytime,Acct-Delay-Time,integer AcctColumnDef acctinputoctets,Acct-Input-Octets,integer AcctColumnDef acctoutputoctets,Acct-Output-Octets,integer AcctColumnDef acctsessionid,Acct-Session-Id AcctColumnDef acctsessiontime,Acct-Session-Time,integer AcctColumnDef acctterminatecause,Acct_Terminate-Cause AcctColumnDef nasidentifier,NAS-Identifier AcctColumnDef nasport,NAS-Port,integer AcctColumnDef clientipaddress,Framed-IP-Address AcctSQLStatement update authenticationtable2 set \ balancetime = balancetime-%{Acct-Session-Time}\ where USERNAME = '%n' /AuthBy SQL # configure SQLAuthentication AuthBy GROUP Identifier SQLAuthentication AuthByPolicy ContinueUntilAccept AuthBy SQLAuthentication1 AuthBy SQLAuthentication2 AddToReply \ Service-Type = Framed-User, \ Framed-Protocol = PPP /AuthBy Realm MaxSessions 1 AuthByPolicy ContinueAlways AuthBy SQLAccounting1 AuthBy SQLAccounting2 AuthBy SQLAuthentication
Re: (Fwd) RE: (RADIATOR) (Fwd) can i have two accounting tables?
Hello Hakim - Could you please send your mail to "[EMAIL PROTECTED]" please (not [EMAIL PROTECTED])? Thanks. hi Hugh!!! I did try that before putting in my question to the mailing list. But some how the accounting is being done in the first AuthBy SQL clause that i mention. I am writing below the snapshot of the configuration file , perhaps i might be making a mistake or missing out on something. For the first two AuthBy SQL clause i want the accounting to be done in accountingtable1 while for the last clause i want the accounting in accountingtable2. (but here the accounting information is going in accountingtable2) Realm MaxSessions 1 AuthByPolicy ContinueWhileReject AuthBy SQL DBSourcedbi:mysql:mydatabase DBUsername DBAuth AuthSelect select PASSWORD,BALANCETIME from AUTHENTICATIONTABLE where \ (USERNAME='%n' and BALANCETIME 0 and (EXPIRY_DATE now() or EXPIRY_DATE IS NULL)) AuthColumnDef 0,Password,check AuthColumnDef 1,Session-Timeout,reply AddToReply Service-Type = Framed,Framed-Protocol = PPP AccountingStopsOnly AccountingTable ACCOUNTINGTABLE1 AcctColumnDef USERNAME,User-Name AcctColumnDef CALLDATE,Timestamp,integer-date AcctColumnDef ACCTSTATUSTYPE,Acct-Status-Type,integer AcctColumnDef ACCTDELAYTIME,Acct-Delay-Time,integer AcctColumnDef ACCTINPUTOCTETS,Acct-Input-Octets,integer AcctColumnDef ACCTOUTPUTOCTETS,Acct-Output-Octets,integer AcctColumnDef ACCTSESSIONID,Acct-Session-Id AcctColumnDef ACCTSESSIONTIME,Acct-Session-Time,integer AcctColumnDef ACCTTERMINATECAUSE,Acct_Terminate-Cause AcctColumnDef NASIDENTIFIER,NAS-Identifier AcctColumnDef NASIDENTIFIER,NAS-IP-Address AcctColumnDef NASPORT,NAS-Port,integer AcctColumnDef CLIENTIPADDRESS,Framed-IP-Address # You can use this to force Radiator to limit # maximum session times to how many minutes # are left in subaccounts.timeleft AcctSQLStatement update AUTHENTICATIONTABLE set BALANCETIME = BALANCETIME-%{Acct-Session-Time} \ where USERNAME = '%n' /AuthBy AuthByPolicy ContinueWhileReject MaxSessions 1 AuthBy SQL #accounting for this authby clause to go in accountingtable1 # Change DBSource, DBUsername, DBAuth for your database # See the reference manual DBSourcedbi:mysql:mydatabase DBUsername DBAuth AuthSelect select PASSWORD,EXPIRY_DATE from UNLIMITED where USERNAME='%n' and (EXPIRY_DATE now() or EXPIRY_DATE is NULL) AuthColumnDef 0,Password,check AddToReply Service-Type = Framed,Framed-Protocol = PPP /AuthBy AuthByPolicy ContinueWhileReject AuthBy SQL DBSource dbi:mysql:mydatabase DBUsername DBAuth AuthSelect select password,balancetime from AUTHENTICATIONTABLE2 where (username='%n' and status = 1) AuthColumnDef0,Password,check AuthColumnDef1,Session-Timeout,Reply AccountingStopsOnly AccountingTable accountingtable2 AcctColumnDef username,User-Name AcctColumnDef calldate,Timestamp,formatted-date,to_date\ ('%e %m %Y %H %M %S','DD MM HH24:MI:SS') AcctColumnDef acctstatustype,Acct-Status-Type,integer AcctColumnDef acctdelaytime,Acct-Delay-Time,integer AcctColumnDef acctinputoctets,Acct-Input-Octets,integer AcctColumnDef acctoutputoctets,Acct-Output-Octets,integer AcctColumnDef acctsessionid,Acct-Session-Id AcctColumnDef acctsessiontime,Acct-Session-Time,integer AcctColumnDef acctterminatecause,Acct_Terminate-Cause AcctColumnDef nasidentifier,NAS-Identifier AcctColumnDef nasport,NAS-Port,integer AcctColumnDef clientipaddress,Framed-IP-Address AcctSQLStatement update authenticationtable2 set balancetime = balancetime-%{Acct-Session-Time}\ where USERNAME = '%n' /AuthBy SQL /Realm Using two AuthBy SQL clauses like this will not work. Perhaps you could give me a little more detail on what you want
(RADIATOR) (Fwd) can i have two accounting tables?
--- Forwarded mail from "Hakim Tass" [EMAIL PROTECTED] From: "Hakim Tass" [EMAIL PROTECTED] To: "Radiator mailing list" [EMAIL PROTECTED] Subject: can i have two accounting tables? Date: Sun, 15 Oct 2000 15:28:34 +0300 hello!!! can i have different accountingtables for each AuthBy SQL clause that i write. i wanted to keep the accounting information in separate tables for different group of users. Regards Hakim ---End of forwarded mail from "Hakim Tass" [EMAIL PROTECTED] -- Mike McCauley [EMAIL PROTECTED] Open System Consultants Pty. LtdUnix, Perl, Motif, C++, WWW 24 Bateman St Hampton, VIC 3188 Australia http://www.open.com.au Phone +61 3 9598-0985 Fax +61 3 9598-0955 Radiator: the most portable, flexible and configurable RADIUS server anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald, Platypus, Freeside, TACACS+, PAM, external, Active Directory etc etc on Unix, Win95/8, 2000, NT, MacOS 9, MacOS X === Archive at http://www.starport.net/~radiator/ Announcements on [EMAIL PROTECTED] To unsubscribe, email '[EMAIL PROTECTED]' with 'unsubscribe radiator' in the body of the message.
Re: (RADIATOR) (Fwd) can i have two accounting tables?
From the Documentation, Section 6.26 AuthBy SQL 6.26.8 AccountingTable This is the name of the table that will be used to store accounting records. Defaults to "ACCOUNTING". If AccountingTable is defined to be an empty string, all accounting requests will be accepted and acknowledged, but no accounting data will be stored. You must also define at least one AcctColumnDef before accounting data will be stored. The AccountingTable table name can contain special formatting characters: table names based on the current year and/or month might be useful, so you can rotate your accounting tables. # store accounting records in RADUSAGEmm table AccountingTable RADUSAGE%Y%m So you just need to add an ACcountingTable entry to each AuthBy SQL statement, telling it what table to use. -- Ron Hensley ([EMAIL PROTECTED]) CCNA #10082337 Network Administrator - ICNet Internet Services -- - Original Message - From: "Mike McCauley" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, October 16, 2000 9:00 AM Subject: (RADIATOR) (Fwd) can i have two accounting tables? --- Forwarded mail from "Hakim Tass" [EMAIL PROTECTED] From: "Hakim Tass" [EMAIL PROTECTED] To: "Radiator mailing list" [EMAIL PROTECTED] Subject: can i have two accounting tables? Date: Sun, 15 Oct 2000 15:28:34 +0300 hello!!! can i have different accountingtables for each AuthBy SQL clause that i write. i wanted to keep the accounting information in separate tables for different group of users. Regards Hakim ---End of forwarded mail from "Hakim Tass" [EMAIL PROTECTED] -- Mike McCauley [EMAIL PROTECTED] Open System Consultants Pty. LtdUnix, Perl, Motif, C++, WWW 24 Bateman St Hampton, VIC 3188 Australia http://www.open.com.au Phone +61 3 9598-0985 Fax +61 3 9598-0955 Radiator: the most portable, flexible and configurable RADIUS server anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald, Platypus, Freeside, TACACS+, PAM, external, Active Directory etc etc on Unix, Win95/8, 2000, NT, MacOS 9, MacOS X === Archive at http://www.starport.net/~radiator/ Announcements on [EMAIL PROTECTED] To unsubscribe, email '[EMAIL PROTECTED]' with 'unsubscribe radiator' in the body of the message. === Archive at http://www.starport.net/~radiator/ Announcements on [EMAIL PROTECTED] To unsubscribe, email '[EMAIL PROTECTED]' with 'unsubscribe radiator' in the body of the message.