Hello,
I am running radpwtst and everytime I do so I get an error. I am
putting all accounting into a mysql database and authenticating off of a
flat file. Here is one of the repeditive errors being sent to STDOUT.
DBD::mysql::db do failed: You have an error in your SQL syntax near
'203.63.154.1' and NASPORT=1234
')' at line 2 at /usr/local/lib/perl5/site_perl/5.005/Radius/SqlDb.pm line
189.
Thu May 13 17:54:38 1999: ERR: do failed for 'insert into RADLOG
(TIME_STAMP, PRIORITY, MESSAGE)
values (926632478, 4, 'do query is: delete from RADONLINE
where NASIDENTIFIER='203.63.154.1' and NASPORT=1234
')': You have an error in your SQL syntax near '203.63.154.1' and
NASPORT=1234
')' at line 2
DBD::mysql::db do failed: You have an error in your SQL syntax near
'203.63.154.1' and NASPORT=1234
')' at line 2 at /usr/local/lib/perl5/site_perl/5.005/Radius/SqlDb.pm line
189.
Thu May 13 17:54:38 1999: ERR: do failed for 'insert into RADLOG
(TIME_STAMP, PRIORITY, MESSAGE)
values (926632478, 4, 'do query is: delete from RADONLINE
where NASIDENTIFIER='203.63.154.1' and NASPORT=1234
')': You have an error in your SQL syntax near '203.63.154.1' and
NASPORT=1234
')' at line 2
It is logging properly to the ACCOUNTING, RADONLINE and RADLOG tables. I
have just started testing your product for which we have purchased a
license. Any help would be appreciated. I have attached the radius.cfg
that I am using as well.
Thank You,
Oliver Stockhammer
The Internet Channel
180 Varick St. NY NY 10023 USA
[EMAIL PROTECTED]
# radius.cfg
#
# This is a very simple radius.cfg that you can use to get started.
# only the most important parameters are set here. The full set
# of parameters can be seen in radius.cfg in the top of the distribution tree.
#
# As it stands, it will authenticate a single client and a
# single realm from a flat file
# database, and save the accounting info to a single details file.
#
# Author: Mike McCauley ([EMAIL PROTECTED])
# Copyright (C) 1997 Open System Consultants
# $Id: radius.cfg,v 1.3 1999/01/28 05:13:52 mikem Exp $
LogStdout
# Set this to the directory where your logfile and details file are to go
LogDir /var/log/radius
# Set this to the database directory. It should contain these files:
# users The user database
# dictionary The dictionary for your NAS
DbDir /usr/local/etc/radiusDB
########################################################
## Added for USR shite ##
########################################################
#SnmpgetProg /usr/bin/snmpget
# This clause defines a single client to listen to
<Client ancillary.inch.com>
Secret crap@ss
NasType TotalControl
</Client>
# For testing: this allows us to honour requests from radpwtst
# on the same host.
<Client localhost>
Secret mysecret
DupInterval 0
</Client>
# This clause handles all users from all realms by looking them up
# in the users file at /usr/local/etc/raddb/users
#<Realm DEFAULT>
# <AuthBy FILE>
# # The filename defaults to %D/users
# Filename %D/users
# </AuthBy>
# # Log accounting to the detail file in LogDir
# AcctLogFileName %L/detail
#</Realm>
<Realm DEFAULT>
RewriteUsername s/^([^@]+).*/$1/
AuthByPolicy ContinueAlways
<AuthBy SQL>
DBSource dbi:mysql:Radiator
DBUsername root
DBAuth crap@ss
# an empty AuthSelect turns off auth
AuthSelect
AccountingTable ACCOUNTING
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 ACCTTERMINATECAUSE,Acct-Terminate-Cause
AcctColumnDef NASIDENTIFIER,NAS-Identifier
AcctColumnDef NASIDENTIFIER,NAS-IP-Address
AcctColumnDef NASPORT,NAS-Port,integer
</AuthBy>
<AuthBy FILE>
# The filename defaults to %D/users
Filename %D/users
</AuthBy>
<AuthBy FILE>
Filename %D/users1
</AuthBy>
</Realm>
<SessionDatabase SQL>
DBSource dbi:mysql:Radiator
DBUsername root
DBAuth crap@ss
# AddQuery insert into .....
# DeleteQuery delete from .....
# ClearNasQuery delete from ...
# CountQuery select ........
</SessionDatabase>
<Log SQL>
DBSource dbi:mysql:Radiator
DBUsername root
DBAuth crap@ss
Trace 5
</Log>