FW: (RADIATOR) AutBySQL - Authencitation and Accounting Problem

Kadir Saruhan KSaruhan at e-kolay.com
Fri Jun 10 05:07:16 CDT 2005




Thanks Hugh; but i have one problem. When user authentication failed
i'have seen following logs. When authenticaiton failed it is continues
trying to authentication.
How can i solve this?

Code:       Access-Request
Identifier: 102
Authentic:
<190>9<187><196><134><182><142>(<236><131><148><178>D<183>d<149>
Attributes:
        CHAP-Challenge =
<248><25><133><150><162><2><13><29><135><166><208>^<168><5><206>[<3><31>
<7><19>
        CHAP-Password =
<1><16><205><2><17><247><196><214><196><203>{c9<131><186><206><26>
        User-Name = "xxxx
        Called-Station-Id = "xxxx
        Calling-Station-Id = "xxxxx
        Framed-Protocol = GPRS-PDP-Context
        NAS-Port-Type = Virtual
        NAS-Port = 60000
        Service-Type = Framed-User
        NAS-IP-Address = xxxx

Fri Jun 10 10:20:33 2005: DEBUG: Handling request with Handler
'Realm=DEFAULT'
Fri Jun 10 10:20:33 2005: DEBUG: Rewrote user name to dologo02
Fri Jun 10 10:20:33 2005: DEBUG: SDB1 Deleting session for dologo02,
83.66.0.254, 60000
Fri Jun 10 10:20:33 2005: DEBUG: do query is: 'delete from RADONLINE
where NASIDENTIFIER='83.66.0.254' and NASPORT=060000':
Fri Jun 10 10:20:33 2005: DEBUG: Handling with Radius::AuthSQL
Fri Jun 10 10:20:33 2005: DEBUG: Handling with Radius::AuthGROUP
Fri Jun 10 10:20:33 2005: DEBUG: Handling with Radius::AuthSQL
Fri Jun 10 10:20:33 2005: DEBUG: Handling with Radius::AuthSQL:
Fri Jun 10 10:20:33 2005: DEBUG: Query is: 'Sp_GET_User_Authentication
'dologo02', '905333311262'':
Fri Jun 10 10:20:33 2005: DEBUG: Radius::AuthSQL looks for match with
dologo02
Fri Jun 10 10:20:33 2005: DEBUG: Radius::AuthSQL REJECT: Bad Password
Fri Jun 10 10:20:33 2005: DEBUG: Query is: 'Sp_GET_User_Authentication
'DEFAULT', '905333311262'':
Fri Jun 10 10:20:33 2005: DEBUG: Radius::AuthSQL looks for match with
DEFAULT
Fri Jun 10 10:20:33 2005: DEBUG: Radius::AuthSQL REJECT: Bad Password
Fri Jun 10 10:20:33 2005: DEBUG: Query is: 'Sp_GET_User_Authentication
'DEFAULT1', '905333311262'':
Fri Jun 10 10:20:33 2005: DEBUG: Radius::AuthSQL looks for match with
DEFAULT1
Fri Jun 10 10:20:33 2005: DEBUG: Radius::AuthSQL REJECT: Bad Password
Fri Jun 10 10:20:33 2005: DEBUG: Query is: 'Sp_GET_User_Authentication
'DEFAULT2', '905333311262'':
Fri Jun 10 10:20:33 2005: DEBUG: Radius::AuthSQL looks for match with
DEFAULT2
Fri Jun 10 10:20:33 2005: DEBUG: Radius::AuthSQL REJECT: Bad Password
Fri Jun 10 10:20:33 2005: DEBUG: Query is: 'Sp_GET_User_Authentication
'DEFAULT3', '905333311262'':
Fri Jun 10 10:20:33 2005: DEBUG: Radius::AuthSQL looks for match with
DEFAULT3
Fri Jun 10 10:20:33 2005: DEBUG: Radius::AuthSQL REJECT: Bad Password
...........
..........



-----Original Message-----
From: Hugh Irvine [mailto:hugh at open.com.au] 
Sent: Thursday, June 09, 2005 11:03 AM
To: Kadir Saruhan
Cc: radiator at open.com.au
Subject: Re: (RADIATOR) AutBySQL - Authencitation and Accounting Problem


Hello Kadir -

You should do something like this:

<Realm DEFAULT>

     SessionDatabase SDB1

     MaxSessions 1

     RewriteUsername s/^([^@]+).*/$1/

     # define overall AuthByPolicy

     AuthByPolicy ContinueAlways
     # This autby sql for accounting logs

     <AuthBy SQL>

         HandleAcctStatusTypes Start,Alive,Stop

         DBSource dbi:ODBC:DSN=xxxx

         DBUsername

         DBAuth

         # disable authentication

         AuthSelect

         AcctSQLStatement EXEC Sp_INS_AccountingLog\

                 '%n',\

                 '%m.%d.%Y %H:%M:%S',\

                 '%{Acct-Status-Type}',\

                 '%{Acct-Delay-Time}',\

                 '%{Acct-Input-Octets}',\

                 '%{Acct-Output-Octets}',\

                 '%{Acct-Session-Id}',\

                 '%{Acct-Session-Time}',\

                 '%{Acct-Terminate-Cause}',\

                 '%{NAS-IP-Address}',\

                 '%{NAS-Port}',\

                 '%{Framed-IP-Address}',\

                 '%{Called-Station-Id}',\

                 '%{Calling-Station-Id}',\

                 '213.243.1.36:1813','%{Connect-Info}'\

                 '%{Ascend-Xmit-Rate}'

     </AuthBy>

     # define AuthBy GROUP for authentication
     # with AuthByPolicy ContinueWhileAccept

     <AuthBy GROUP>

         AuthByPolicy ContinueWhileAccept
         #This authbysql authenticate user

         <AuthBy SQL>

                 DBSource        dbi:mysql:hostname=localhost:RADIUS

                 DBUsername      xxxx

                 DBAuth          xxxx

                 AuthSelect select PASSWORD from users where  
USERNAME='%n'

         </AuthBy>

          <AuthBy DYNADDRESS>

                 AddressAllocator myallocator

                 PoolHint        pool1

                 MapAttribute    yiaddr, Framed-IP-Address

                 MapAttribute    subnetmask, Framed-IP-Netmask

                 MapAttribute    dnsserver, DNSServer

         </AuthBy>

     </AuthBy>

</Realm>


Please read the relevant sections of the Radiator 3.13 reference  
manual ("doc/ref.html").

regards

Hugh

--
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.


More information about the radiator mailing list