Hugh, here are the ACCOUNTING logs for two identical logins and the
corresponding (by timestamp) RADLOG entries.  One successfully updated and
one did not.  There were no error logs corresponding in the text logfile.
My only guess is that perhaps mysql failed to input the entry, although
there is not any sign of that either.

The PreAuthHook directive worked quite well, and is serving us quite well.
We will be using that solution.  Thanks for your help.

Cheers-
Oliver

On Fri, 13 Aug 1999, Hugh Irvine wrote:

> 
> Hi Oliver -
> 
> On Fri, 13 Aug 1999, O Stockhammer wrote:
> > Hugh,
> >     Is there anyway to actually have Radiator append info to the
> > incoming data, so that it only uses on query per request?  
> >     I have created an AcctSQLStatement, but it seems because it is an
> > additional query that it doesn't update the row of data in mysql every 
> > time (It misses a few Acct submissions here and there).  Here is what I am
> > using:
> > 
> >                 AcctSQLStatement        Update ACCOUNTING set ORIGIN ='Auth-2:
> > local' where TIME_STAMP = %{Timestamp} and NAS_IDENTIFIER = '%N' and
> > NAS_PORT= '%{NAS-Port}'
> > 
> >     The purpose of the query is to ID the realm and radiator server
> > which is doing the Authentication(The value of ORIGIN changes for each
> > Realm) . It there anyway to have radiator include this data in the
> > original ACCTING queries, so that it is all in one, so to speak?  Perhaps
> > there is an easy way to modify AcctColumnDef to have a fourth field which
> > is the actual value for the column.
> > 
> 
> Hmmm. I am perplexed to imagine how your configuration could miss any updates,
> given that the insert and the update are executed sequentially with the same
> packet. It would be most enlightening to see a debug at trace level 4 to see
> what is going on.
> 
> But to answer your question, yes you can set up a PreAuthHook to insert a
> pseudo-attribute into the packet and you can even use the special formatting
> character "%h" to set it to the Radiator hostname. Then you can use the
> standard AcctColumnDef to insert the value directly into the original
> accounting record. This is probably a better solution in any case.
> 
> There is an example PreAuthHook in Section 6.13.10 of the Radiator 2.14.1
> reference manual.
> 
> hth
> 
> Hugh
> 
>  --
> Radiator: the most portable, flexible and configurable RADIUS server
> anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
> Platypus, Freeside, TACACS+, PAM, external, etc etc on Unix, Win95/8,
> NT, Rhapsody
> 
          kaligula  934495962  Aug 12, 1999 18:12  Start  1.2.34.5  1234   Auth-2: 
@inch.com  
          kaligula  934495962  Aug 12, 1999 18:12   Stop  1.2.34.5  1234    
          kaligula  934495972  Aug 12, 1999 18:12  Start  1.2.34.5  1234    
          kaligula  934495973  Aug 12, 1999 18:12   Stop  1.2.34.5  1234    
934495962  4  Handling request with Handler 'Realm=inch.com'  
934495962  4                   Rewrote user name to kaligula  
934495962  4                   Handling with Radius::AuthSQL  
934495962  4                  Handling with Radius::AuthFILE  
934495962  4  Radius::AuthFILE looks for match with kaligula  
934495962  4                  Handling with Radius::AuthUNIX  
934495962  4  Radius::AuthUNIX looks for match with kaligula  
934495962  4                        Radius::AuthUNIX ACCEPT:  
934495962  4                        Radius::AuthFILE ACCEPT:  
934495962  4                    Access accepted for kaligula  
934495962  4  Handling request with Handler 'Realm=inch.com'  
934495962  4                   Rewrote user name to kaligula  
934495962  4                   Handling with Radius::AuthSQL  
934495962  4        Handling accounting with Radius::AuthSQL  
934495962  4  do query is: Update ACCOUNTING set ORIGIN = 'Auth-2: @inch.com' where 
TIME_STAMP = 934495962 and NAS_IDENTIFIER = '1.2.34.5' and NAS_PORT= '1234'
  
934495962  4  do query is: insert into ACCOUNTING
                (USERNAME, NAS_PORT_TYPE, SERVICE_TYPE, ACCTSTATUSTYPE, 
NAS_IDENTIFIER, NAS_PORT, ACTUAL_TIME, CLIENT_ID, ACCTSESSIONID, TIME_STAMP) 
                values 
                ('kaligula', 'As  
934495962  4     Adding session for kaligula, 1.2.34.5, 1234  
934495962  4  do query is: delete from RADONLINE where USERNAME='kaligula' and 
NAS_IDENTIFIER='1.2.34.5' and NAS_PORT=1234
  
934495962  4  do query is: insert into RADONLINE (USERNAME, NAS_IDENTIFIER, NAS_PORT, 
ACCTSESSIONID, TIME_STAMP, FRAMED_IP_ADDRESS, NAS_PORT_TYPE, 
SERVICE_TYPE,USR_MODULATION_TYPE ,USR_CONNECT_SPEED) values ('kalig  
934495962  4                             Accounting accepted  
934495962  4  Handling request with Handler 'Realm=inch.com'  
934495962  4                   Rewrote user name to kaligula  

934495973  4                                                                         
Handling request with Handler 'Realm='  
934495973  4                                                                           
       Handling with Radius::AuthSQL  
934495973  4                                                                       
Handling accounting with Radius::AuthSQL  
934495973  4  do query is: Update ACCOUNTING set ORIGIN = 'Auth-2: local' where 
TIME_STAMP = 934495973 and NAS_IDENTIFIER = '1.2.34.5' and NAS_PORT= '1234'
  
934495973  4  do query is: insert into ACCOUNTING
                (USERNAME, NAS_PORT_TYPE, ACCTSESSIONTIME, SERVICE_TYPE, 
ACCTINPUTOCTETS, ACCTSTATUSTYPE, NAS_IDENTIFIER, NAS_PORT, ACTUAL_TIME, CLIENT_ID, 
ACCTSESSIONID, TIME_ST  
934495973  4                                                                  Deleting 
session for kaligula, 1.2.34.5, 1234  
934495973  4  do query is: delete from RADONLINE where USERNAME='kaligula' and 
NAS_IDENTIFIER='1.2.34.5' and NAS_PORT=1234
  
934495973  4                                                                           
                 Accounting accepted  

Reply via email to