HI All,
I am still unable to get SQL logging to work while running radiator as a
service. I have included a copy of my radius.cfg(no secrets) and also
remove some of the Column definitions, but you should get the idea of what
I am doing. I am using sevany out of the nt resource kit as my service
with the following parameter:
"c:\perl\bin\perl radiusd -config_file d:\radiator-2.14.1\radius.cfg"
The weird thing is I do not receive any error messages in the log, it just
does not log to SQL. I thought it might be because I have a space in my
DBSource, but authentication works fine with a space in the DBSource.
Can anyone help?
# Radius.cfg
#
# Port to listen to Authentication requests on
AuthPort 1812
# Port to listen to Accounting requests on
AcctPort 1813
Foreground
LogStdout
# Show everything except debug info in the error log.
Trace 3
#----------------------------------------------------------
# Log to sql server here
#----------------------------------------------------------
<Log SQL>
# Defines how to connect to the database. See examples below
DBSource dbi:ODBC:LOG SQL
DBUsername SA
DBAuth SA
Table radlog
Trace 3
</Log>
# Log Directory and Log file name
LogDir D:\radiator-2.14.1\log
LogFile %L/%Y-%m-%d Radius.Log
DbDir D:\radiator-2.14.1
# ---------------------------------------------
# Client Information
# ---------------------------------------------
# Client for All Local requests
<Client localhost>
Secret Secret
DupInterval 2
</Client>
<Client 199.190.151.252>
Secret secret
DupInterval 2
DefaultRealm nms
</Client>
<Client DEFAULT>
Secret secret
DupInterval 2
</Client>
# -----------------------------------------------
# Realm Information
# -----------------------------------------------
<Realm nms>
RewriteUsername s/^([^@]+).*/$1/
RewriteUsername tr/A-Z/a-z/
# Set the session database to and internal file
SessionDatabase SDB2
<AuthBy SQL>
DBSource dbi:ODBC:SDB LOG
DBUsername SA
DBAuth SA
AuthSelect select PASSWORD, CHECKATTR, REPLYATTR from AUTHENTICATION
where USERNAME='%n'
Timeout 20
</AuthBy>
</Realm>
<Realm DEFAULT>
MaxSessions 2
RewriteUsername tr/A-Z/a-z/
# Set the session database to SQL
SessionDatabase SDB1
<AuthBy SQL>
DBSource dbi:ODBC:AUTH SQL
DBUsername SA
DBAuth SA
AccountingStopsOnly
AccountingTable ACCOUNTING
AuthSelect select PASSWORD, CHECKATTR, REPLYATTR from AUTHENTICATION
where USERNAME='%n'
Timeout 20
</AuthBy>
</Realm>
# -----------------------------------------------------
# Session Database information.
# -----------------------------------------------------
<SessionDatabase DBM>
Filename %D/NMS
Identifier SDB2
</SessionDatabase>
<SessionDatabase SQL>
DBSource dbi:ODBC:LOG SQL
DBUsername SA
DBAuth SA
AddQuery insert into RADONLINE (USERNAME, NASIDENTIFIER, NASPORT, \
ACCTSESSIONID, TIME_STAMP, FRAMEDIPADDRESS, NASPORTTYPE, \
SERVICETYPE) values ('%n', '%N', %{NAS-Port}, '%{Acct-Session-Id}',
'%m/%d/%Y %H:%M:%S', '%{Framed-Address}', \
'%{Port-Type}', '%{Service-Type}')
DeleteQuery delete from RADONLINE where USERNAME='%n' and \
NASIDENTIFIER='%N' and NASPORT=%{NAS-Port}
ClearNasQuery delete from RADONLINE where NASIDENTIFIER='%N'
CountQuery select NASIDENTIFIER, NASPORT, ACCTSESSIONID from RADONLINE \
where USERNAME='%n'
# Optional identifier. Its just a name
Identifier SDB1
</SessionDatabase>
If you any questions please contact me at:
Personal Address
[EMAIL PROTECTED]
Opinions are mine and do not necessarily reflect
those of wyoming.com
===
Archive at http://www.thesite.com.au/~radiator/
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.