Hey, I'm trying to accomplish several things, but just cant get them to work
together. I Authenticate using AuthBy PLATYPUS, and also send additional
accounting information and log info to a MySQL server. The biggest problem
is that my stinking Windows NT box that runs SQL server throws a
temper-tantrum every week or so and insists on being rebooted.
When the NT box is rebooted, obviously SQL stops and users cannot
authenticate. However, when it comes back up, radiator still thinks its
down and rejects logins until radiusd is killed with a kill -9 and
restarted. What I have done is create a script which runs nightly and
creates a flat file to be used with AuthBy FILE. Optimally, what I want to
happen is if (when) MsSQL server goes down or stops responding, then radius
authenticate through the flat file, write a common format detail file (and
still log to my MySQL database), and then when (if) SQL comes back up, start
authenticating through Platypus again. I've been looking into the AuthBy
GROUP command, which is what I think I need, but haven't had any luck.
Below is what I am using now, without the fall-back to the flat file. BTW,
since I'm including this config, the Log RejectSQL doesnt work, any ideas?
Thanks!
Foreground
LogStdout
LogDir /var/log/radiusd
DbDir /usr/local/etc
DictionaryFile /usr/local/etc/dictionary
Trace 4
<Client localhost>
Secret mysecret
</Client>
<Client DEFAULT>
Secret mysecret
# DupInterval 0
</Client>
<Realm DEFAULT>
AuthByPolicy ContinueAlways
<AuthBy SQL>
DBSource dbi:mysql:radiustbl:localhost
DBUsername myusername
DBAuth mypasswd
AuthSelect
AcctColumnDef ACCTAUTHENTIC,Acct-Authentic,integer
AcctColumnDef ACCTDELAYTIME,Acct-Delay-Time,integer
AcctColumnDef ACCTINPUTOCTETS,Acct-Input-Octets,integer
AcctColumnDef ACCTINPUTPACKETS,Acct-Input-Packets,integer
AcctColumnDef ACCTOUTPUTOCTETS,Acct-Output-Octets,integer
AcctColumnDef ACCTOUTPUTPACKETS,Acct-Output-Packets,integer
AcctColumnDef ACCTSESSIONID,Acct-Session-Id
AcctColumnDef ACCTSESSIONTIME,Acct-Session-Time,integer
AcctColumnDef ACCTSTATUSTYPE,Acct-Status-Type,integer
AcctColumnDef ACCTTERMINATECAUSE,Acct-Terminate-Cause,integer
AcctColumnDef ASCENDCONNECTPROGRESS,Ascend-Connect-Progress,integer
AcctColumnDef ASCENDDATARATE,Ascend-Data-Rate,integer
AcctColumnDef ASCENDDISCONNECTCAUSE,Ascend-Disconnect-Cause,integer
AcctColumnDef ASCENDFIRSTDEST,Ascend-First-Dest
AcctColumnDef ASCENDMODEMPORTNO,Ascend-Modem-PortNo,integer
AcctColumnDef ASCENDMODEMSLOTNO,Ascend-Modem-SlotNo,integer
AcctColumnDef ASCENDMULTILINKID,Ascend-Multilink-ID,integer
AcctColumnDef ASCENDNUMINMULTILINK,Ascend-Num-In-Multilink,integer
AcctColumnDef ASCENDPREINPUTOCTETS,Ascend-Pre-Input-Octets,integer
AcctColumnDef ASCENDPREINPUTPACKETS,Ascend-Pre-Input-Packets,integer
AcctColumnDef ASCENDPREOUTPUTOCTETS,Ascend-Pre-Output-Octets,integer
AcctColumnDef
ASCENDPREOUTPUTPACKETS,Ascend-Pre-Output-Packets,integer
AcctColumnDef ASCENDPRESESSIONTIME,Ascend-PreSession-Time,integer
AcctColumnDef ASCENDXMITRATE,Ascend-Xmit-Rate,integer
AcctColumnDef CALLEDSTATIONID,Called-Station-Id
AcctColumnDef CALLINGSTATIONID,Calling-Station-Id
AcctColumnDef CONNECTINFO,Connect-Info
AcctColumnDef FRAMEDIPADDRESS,Framed-Ip-Address
AcctColumnDef FRAMEDPROTOCOL,Framed-Protocol,integer
AcctColumnDef NASIPADDRESS,NAS-IP-Address
AcctColumnDef NASIDENTIFIER,NAS-Identifier
AcctColumnDef NASPORT,NAS-Port,integer
AcctColumnDef NASPORTTYPE,NAS-Port-Type,integer
AcctColumnDef SERVICETYPE,Service-Type,integer
AcctColumnDef TIMESTAMP,Timestamp,integer
AcctColumnDef USERNAME,User-Name
</AuthBy SQL>
<AuthBy PLATYPUS>
DBSource dbi:Sybase:MYINTNAME
DBUsername platusername
DBAuth platpasswd
AuthSelect ' '
# AccountingTable
</AuthBy PLATYPUS>
MaxSessions 2
PasswordLogFileName /var/log/radiusd/pwlog
# Log accounting to the detail file in LogDir
# AcctLogFileName /var/log/radiusd/detail
</Realm>
<Log SQL>
DBSource dbi:mysql:radiustbl:localhost
DBUsername myusername
DBAuth mypasswd
Trace 3
</Log SQL>
<Log RejectSQL>
DBSource dbi:mysql:radiustbl:localhost
DBUsername myusername
DBAuth mypasswd
Table rejectlog
</Log RejectSQL>
<SNMPAgent>
Community mysnmppw
Port mysnmpport
</SNMPAgent>
<SessionDatabase SQL>
Identifier SDB1
DBSource dbi:mysql:radiustbl:localhost
DBUsername myusername
DBAuth mypasswd
AddQuery insert into RADONLINE (USERNAME, NASIDENTIFIER, NASPORT, \
ACCTSESSIONID, TIME_STAMP, FRAMEDIPADDRESS, CALLINGSTATIONID, \
CONNECTINFO, NASPORTTYPE, \
SERVICETYPE) values ('%n', '%N', %{NAS-Port}, '%{Acct-Session-Id}',
\
%{Timestamp}, '%{Framed-IP-Address}','%{Calling-Station-Id}', \
'%{Connect-Info}', \
'%{NAS-Port-Type}', '%{Service-Type}')
</SessionDatabase SQL>
----------------------
also, my user file looks like this:
mike Password = "fred"
jack Password = "benimble"
jill Password = "doe"
.....etc....
===
Archive at http://www.thesite.com.au/~radiator/
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.