Hello Ray -

I would suggest that you seperate your processing, something like this:

<AuthBy SQL>
        Identifier SQL_Accounting
        DBSource ....
        DBUsername .....
        DBAuth ....
        AuthSelect
        AccountingTable .....
        AcctColumnDef ....
        .....
</AuthBy>

<AuthBy SQL>
        Identifier SQL_Authentication
        DBSource ....
        DBUsername .....
        DBAuth ....
        AuthSelect ......
        AuthColumnDef .....
        ......
</AuthBy>

<AuthBy FILE>
        Identifier Check_FILE
        Filename        /etc/raddb/users
</AuthBy>

<Handler Request-Type = Accounting-Request>
        AuthBy SQL_Accounting
</Handler>

<Handler>
        AuthByPolicy ContinueUntilAccept
        AuthBy Check_FILE
        AuthBy SQL_Authentication
        .....
</Handler>

I'll leave you to fill in the rest of the details.

cheers

Hugh


On Fri, 01 Sep 2000, Raymond Brighenti wrote:
> Hi all,
> 
> The setup I want is for Radiator to check a users file and if the user 
> isn't there to Auth off a MySQL dbase. The Auth/Acc works fine until I put 
> the AuthBy FILE in, in which case it stops logging to the MySQL dbase.
> 
> Is there a AuthByPolicy I should use possibly? (Although I think I've tried 
> just about every one :)
> 
> Thanks
> 
> Ray
> 
> 
> <SessionDatabase SQL>
>   ### Database Settings ###
> DBSource dbi:mysql:dbase:host
> DBUsername    username
> DBAuth        password
> 
>   ### AddQuery ###
> AddQuery insert into RADONLINE( USERNAME, NASIDENTIFIER, NASPORT,\
> ACCTSESSIONID, TIMESTAMP, FRAMEDIPADDRESS, CALLERID, DNIS, TXRATE, RXRATE) \
> values ("%n", "%N", '%{NAS-Port}',\
>   '%{Acct-Session-Id}', '%{Timestamp}', '%{Framed-Address}', 
> '%{Caller-Id}', '%{Client-Port-DNIS}', '%{Ascend-Xmit-Rate}', 
> '%{Ascend-Data-Rate}')
> 
>   ### DeleteQuery ###
>   DeleteQuery delete from RADONLINE where NASIDENTIFIER='%N' and \
>   NASPORT=%{NAS-Port}
> </SessionDatabase SQL>
> 
> 
> <Realm DEFAULT>
>       AcctLogFileName /var/log/radacct/maxen/detail-%m-%Y
>       PasswordLogFileName /etc/raddb/password.log
> 
> 
> <AuthBy GROUP>
> 
> AuthByPolicy ContinueUntilReject
> 
>      AuthBy FILE>
>          Filename        /etc/raddb/users
>      </AuthBy>
> 
>      <AuthBy SQL>
>          DBSource        dbi:mysql:dbase:host
>          DBUsername   username
>          DBAuth               password
>          DefaultReply Service-Type = Framed-User,\
>       Framed-Protocol = PPP,\
>       Framed-Routing = None,\
>       Framed-Netmask = 255.255.255.255,\
>       Ascend-Idle-Limit = 1500,\
>       Framed-MTU = 1500,\
>       Ascend-Maximum-Call-Duration = 600
> 
> 
> ### Auth select statement  ###
> AuthSelect select ENCRYPTEDPASSWORD \
> from SUBSCRIBERS \
> where USERNAME='%n'
> 
>          AuthColumnDef 0, Encrypted-Password, check
>          AuthColumnDef 1, CHECKATTR, check
>          AuthColumnDef 2, REPLYATTR, reply
> 
> 
>          AcctColumnDef   USERNAME,User-Name
>          AcctColumnDef   TIME_STAMP,Timestamp,integer
>          AcctColumnDef   ACCTSTATUSTYPE,Acct-Status-Type
>          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   NASIDENTIFIER,NAS-Identifier,string
>          AcctColumnDef   NASPORT,NAS-Port,integer
>          AcctColumnDef   CALLERID,Caller-Id,integer
>          AcctColumnDef   DISCONNECT,Ascend-Disconnect-Cause,integer
>          AcctColumnDef   CAUSE,Ascend-Connect-Progress,integer
>          AcctColumnDef   TXRATE,Ascend-Xmit-Rate,integer
>          AcctColumnDef   RXRATE,Ascend-Data-Rate,integer
>          AcctColumnDef   DNIS,Client-Port-DNIS,integer
>          AcctColumnDef   FRAMEDIPADDRESS,Framed-Address
>          AcctColumnDef   TIME_STAMP_NORM,Timestamp,integer-date
>       AcctColumnDef   TIME_STAMP_NORM,Timestamp,formatted-date,'%Y/%m/%e %H:%M:%S'
>      </AuthBy>
> </AuthBy>
> 
> </Realm>
> 
> 
> 
> ============================================
> "In cases of major discrepancy it's always reality
> that's got it wrong....reality is frequently inaccurate."
> ============================================
> 
> 
> ===
> 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.
-- 
Radiator: the most portable, flexible and configurable RADIUS server 
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald, 
Platypus, Freeside, Interbiller, TACACS+, PAM, external, etc, etc.
Available on Unix, Linux, FreeBSD, Windows 95/98/2000, NT, 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.

Reply via email to