Hi Jeff,

What you can do is to combine both AuthBy clauses into an <AuthBy GROUP> and 
simply put one after the other.

It would be something like this:

<AuthBy GROUP>
        Identifier My_Group

        # carefully with this, ensure that 
        # your AuthBy SQL will return ACCEPT
        AuthByPolicy ContinueWhileAccept

        <AuthBy SQL>
                DBSource        ...
                DBUsername      ...
                DBAuth          ...

                # This select has to succeed in order 
                # to return an ACCEPT (which is needed
                # to continue to the AuthBy RADIUS)
                # TIP: when there is no PASSWORD (NULL)
                # in the selected record, then it's accepted
                # no matter which password is provided
                # in the request
                AuthSelect select PASSWORD from ...

                # now simply define your stuff
                AcctColumnDef ...
        </AuthBy SQL>

        <AuthBy RADIUS>
                <Host XYZ>
                        ...
                </HOST>
        </AuthBy RADIUS>
</AuthBy>

Now you can use this AuthBy GROUP inside your handlers:

<Handler Realm=jeff.com>
        ...
        
        AuthBy My_Group

        ...
</Handler>

Hope that helped!

Cheers,
--Remo

-----Original Message-----
From: [email protected] [mailto:[email protected]] On 
Behalf Of Jeffrey Lee
Sent: Mittwoch, 16. Februar 2011 08:33
To: Michael
Cc: [email protected]
Subject: Re: [RADIATOR] AcctInsertQuery for Authby RADIUS

I tried adding <AuthBy SQL> after <AuthBy RADIUS> but as soon as
<AuthBy RADIUS> is executed, <AuthBy SQL> will not be executed.

Can you actually place <AuthBy SQL> within a <AuthBy RADIUS>?

What I'm trying to achieve is to log the RADIUS accounting records
locally (start, stop & alive) for realms that need to be authenticated
by another RADIUS server. How can I achieve that?


On Wed, Feb 16, 2011 at 11:26 AM, Michael <[email protected]> wrote:
> AcctInsertQuery is for the <AuthBy SQL> section.  it sounds like your trying
> to use it inside or around an <AuthBy RADIUS>.  It doesn't work that way.
> You need to setup an <AuthBy SQL> section where the AcctInsertQuery will be
> inside your <AuthBy RADIUS> or i prefer configuring it outside and calling
> it inside via AuthBy (Identifier).
>
> Without a config sample though, ...can only speculate.
>
> Michael
>
>
> On 11-02-15 07:35 PM, Jeffrey Lee wrote:
>>
>> How do I log all accounting records locally (to a SQL DB) before
>> proxy-forwarding to the respective RADIUS server?
>> I know that I can log the accounting records locally but what I want
>> is to insert the accounting record into a SQL database.
>>
>> I've tried adding AcctInsertQuery between<Authby RADIUS>  tags, but
>> I'm getting this error when I started radiusd.
>> "Wed Feb 16 10:24:07 2011: ERR: Unknown keyword 'AcctInsertQuery' in
>> C:\Program Files\Radiator\radius.cfg line 268"
>>
>> Really need help with this! Thanks
>> _______________________________________________
>> radiator mailing list
>> [email protected]
>> http://www.open.com.au/mailman/listinfo/radiator
>>
>>
>
_______________________________________________
radiator mailing list
[email protected]
http://www.open.com.au/mailman/listinfo/radiator
_______________________________________________
radiator mailing list
[email protected]
http://www.open.com.au/mailman/listinfo/radiator

Reply via email to