Hello AL -
This is either due to an error in a PreHandlerHook, or your ClientListSQL is returning bogus data for the PREHANDLERHOOK column in the database. If you are not using some of the fields you should change the GetClientQuery and replace the fields you are not using with NULL's.
See section 6.6.2 in the Radiator 3.6 reference manual ("doc/ref.html").
regards
Hugh
On Tuesday, Jul 29, 2003, at 23:09 Australia/Melbourne, Charles Alexander McCain wrote:
Hugh,
That seems to have fixed it. However, i see this now.
Tue Jul 29 08:08:37 2003: ERR: Error in PreHandlerHook(): Can't use string
("") as a subroutine ref while "strict refs" in use at
/usr/local/lib/perl5/site_perl/5.6.1/Radius/Client.pm line 338.
What does that mean ?
Thanks, AL
On Tue, 29 Jul 2003, Hugh Irvine wrote:
Hello Charles -
Your configuration file is incorrect - it should look like what is shown below (note the Realm clause at the end).
regards
Hugh
#Foreground #LogStdout LogDir /var/adm/radacct DbDir /etc/raddb
SnmpgetProg /usr/local/bin/snmpget Trace 4 RewriteUsername s/^([EMAIL PROTECTED])[EMAIL PROTECTED]/$1/ RewriteUsername s/^([EMAIL PROTECTED])[EMAIL PROTECTED]/$1/ RewriteUsername s/\s+//g RewriteUsername tr/A-Z/a-z/
<Client DEFAULT> Secret letMEin DupInterval 0 </Client>
<SessionDatabase SQL> DBSource dbi:mysql:radius DBUsername xxxxxxxx DBAuth xxxxxxxxxxx Identifier SQLS
AddQuery insert into RADONLINE (USERNAME,\ NASIDENTIFIER, NASPORT, ACCTSESSIONID, TIME_STAMP,\ FRAMEDIPADDRESS, NASPORTTYPE, SERVICETYPE,DNIS) \ values ('%n', '%N',\ '%{NAS-Port}', '%{Acct-Session-Id}', '%o',\ '%{Framed-IP-Address}', '%{NAS-Port-Type}',\ '%{Service-Type}','%{Called-Station-Id}')
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 ACCTSESSIONID = '%{Acct-Session-Id}'
</SessionDatabase>
<ClientListSQL> DBSource dbi:mysql:radius DBUsername xxxxxxxx DBAuth xxxxxxxxxx </ClientListSQL>
<AuthBy UNIX> DefaultSimultaneousUse 1 Identifier System Filename /etc/shadow </AuthBy>
<AuthBy LDAP2> DefaultSimultaneousUse 1 Identifier LDAP Host 127.0.0.1 Port 389 AuthDN uid=searchuser,dc=centurytel,dc=net AuthPassword xxxxxxxxxx BaseDN %0=%1,ou=people,dc=centurytel,dc=net Scope base UsernameAttr uid PasswordAttr userPassword HoldServerConnection SearchFilter (&(gecos=active)(uid=%1)) AuthAttrDef gidNumber, gid-attr, request DefaultReply Service-Type=Framed-User,Framed-Protocol=PPP </AuthBy>
<AuthBy SQL> #NoDefault DefaultSimultaneousUse 1 Identifier CheckSQL
DBSource dbi:mysql:radius DBUsername xxxxxxxxx DBAuth xxxxxxxx
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 NASPORT,NAS-Port,integer
AcctColumnDef FRAMEDIPADDRESS,Framed-IP-Address
AuthSelect select PASSWORD, CHECKATTR, REPLYATTR \ from SUBSCRIBERS \ where USERNAME=%0
AuthColumnDef 0, User-Password, check AuthColumnDef 1, GENERIC, check AuthColumnDef 2, GENERIC, reply DefaultReply Service-Type=Framed-User,Framed-Protocol=PPP </AuthBy>
<Realm DEFAULT>
SessionDatabase SQLS
RewriteUsername s/^([EMAIL PROTECTED]).*/$1/
PostAuthHook file:"%D/postHook" AcctLogFileName %L/%N/detail
#AuthByPolicy ContinueWhileReject AuthByPolicy ContinueUntilAccept AuthBy LDAP AuthBy CheckSQL AuthBy System
</Realm>
On Tuesday, Jul 29, 2003, at 00:59 Australia/Melbourne, Charles Alexander McCain wrote:
Hello,
I'm having an issue with my config. It is not throwing anything into RADONLINE, in my trace4, i'm not even seeing queries being sent. Perhaps my configs are wrong?
Here is a copy of the config.
#Foreground #LogStdout LogDir /var/adm/radacct DbDir /etc/raddb
SnmpgetProg /usr/local/bin/snmpget Trace 4 RewriteUsername s/^([EMAIL PROTECTED])[EMAIL PROTECTED]/$1/ RewriteUsername s/^([EMAIL PROTECTED])[EMAIL PROTECTED]/$1/ RewriteUsername s/\s+//g RewriteUsername tr/A-Z/a-z/ <Client DEFAULT>
Secret letMEin DupInterval 0
</Client>
<Realm DEFAULT> RewriteUsername s/^([EMAIL PROTECTED]).*/$1/
PostAuthHook file:"%D/postHook" AcctLogFileName %L/%N/detail
<SessionDatabase SQL>
DBSource dbi:mysql:radius DBUsername xxxxxxxx DBAuth xxxxxxxxxxx Identifier SQLS
AddQuery insert into RADONLINE (USERNAME,\ NASIDENTIFIER, NASPORT, ACCTSESSIONID, TIME_STAMP,\ FRAMEDIPADDRESS, NASPORTTYPE, SERVICETYPE,DNIS) \ values ('%n', '%N',\ '%{NAS-Port}', '%{Acct-Session-Id}', '%o',\ '%{Framed-IP-Address}', '%{NAS-Port-Type}',\ '%{Service-Type}','%{Called-Station-Id}')
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 ACCTSESSIONID = '%{Acct-Session-Id}'
</SessionDatabase>
<ClientListSQL>
DBSource dbi:mysql:radius DBUsername xxxxxxxx DBAuth xxxxxxxxxx
</ClientListSQL> <AuthBy UNIX>
DefaultSimultaneousUse 1 Identifier System Filename /etc/shadow
</AuthBy>
<AuthBy LDAP2> DefaultSimultaneousUse 1 Identifier LDAP Host 127.0.0.1 Port 389 AuthDN uid=searchuser,dc=centurytel,dc=net AuthPassword xxxxxxxxxx BaseDN %0=%1,ou=people,dc=centurytel,dc=net Scope base UsernameAttr uid PasswordAttr userPassword HoldServerConnection SearchFilter (&(gecos=active)(uid=%1)) AuthAttrDef gidNumber, gid-attr, request DefaultReply Service-Type=Framed-User,Framed-Protocol=PPP </AuthBy> <AuthBy SQL> #NoDefault DefaultSimultaneousUse 1 Identifier CheckSQL
DBSource dbi:mysql:radius DBUsername xxxxxxxxx DBAuth xxxxxxxx
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 NASPORT,NAS-Port,integer
AcctColumnDef FRAMEDIPADDRESS,Framed-IP-Address
AuthSelect select PASSWORD, CHECKATTR, REPLYATTR \ from SUBSCRIBERS \ where USERNAME=%0
AuthColumnDef 0, User-Password, check AuthColumnDef 1, GENERIC, check AuthColumnDef 2, GENERIC, reply DefaultReply Service-Type=Framed-User,Framed-Protocol=PPP
</AuthBy>
#AuthByPolicy ContinueWhileReject AuthByPolicy ContinueUntilAccept AuthBy LDAP AuthBy CheckSQL AuthBy System
</Realm> === Archive at http://www.open.com.au/archives/radiator/ Announcements on [EMAIL PROTECTED] To unsubscribe, email '[EMAIL PROTECTED]' with 'unsubscribe radiator' in the body of the message.
NB: have you included a copy of your configuration file (no secrets), together with a trace 4 debug showing what is happening?
-- Radiator: the most portable, flexible and configurable RADIUS server anywhere. Available on *NIX, *BSD, Windows 95/98/2000, NT, MacOS X. - Nets: internetwork inventory and management - graphical, extensible, flexible with hardware, software, platform and database independence.
=== Archive at http://www.open.com.au/archives/radiator/ Announcements on [EMAIL PROTECTED] To unsubscribe, email '[EMAIL PROTECTED]' with 'unsubscribe radiator' in the body of the message.
NB: have you included a copy of your configuration file (no secrets), together with a trace 4 debug showing what is happening?
-- Radiator: the most portable, flexible and configurable RADIUS server anywhere. Available on *NIX, *BSD, Windows 95/98/2000, NT, MacOS X. - Nets: internetwork inventory and management - graphical, extensible, flexible with hardware, software, platform and database independence.
=== Archive at http://www.open.com.au/archives/radiator/ Announcements on [EMAIL PROTECTED] To unsubscribe, email '[EMAIL PROTECTED]' with 'unsubscribe radiator' in the body of the message.
