No subject

tdn tdn at tdn.co.ke
Thu Feb 7 02:45:24 CST 2002


Hello Hugh,

> Could you please send me a copy of your configuration file (no secrets)
> together with a trace 4 debug from Radiator showing what is happening.

below find my radius.cfg and trace 4 debug output..

also note that i connect to the SQL database manually OK.....

radius=# select * from users;
 userid | cleartextpassword | encryptedpassword
--------+-------------------+-------------------
 dthaba | test              |
(1 row)



Radius.cfg
----------
LogDir /usr/local/radiator
DbDir /usr/local/radiator/raddb
LogFile         %L/logfile/logfile.%Y%m%d
Trace           4

<Client localhost>
        Secret xxx
        DupInterval 0
</Client>

<Realm DEFAULT>
        <AuthBy SQL>
               DBSource        dbi:Pg:dbname=radius
               DBUsername      radius
               DBAuth          xxx
               AuthSelect select CLEARTEXTPASSWORD from USERS where
USERID='%n';
       </AuthBy>
</Realm>

Trace 4 debug
---------------
*** Received from 127.0.0.1 port 1046 ....
Code:       Access-Request
Identifier: 67
Authentic:  1234567890123456
Attributes:
        User-Name = "dthaba"
        Service-Type = Framed-User
        NAS-IP-Address = 203.63.154.1
        NAS-Port = 1234
        Called-Station-Id = "123456789"
        Calling-Station-Id = "987654321"
        NAS-Port-Type = Async
        User-Password =
"<141><238>,<217><150>e<4><246><188>8<9><160><216>}x<153>"

Thu Feb  7 11:18:53 2002: DEBUG: Handling request with Handler
'Realm=DEFAULT'
Thu Feb  7 11:18:53 2002: DEBUG:  Deleting session for dthaba, 203.63.154.1,
1234
Thu Feb  7 11:18:53 2002: DEBUG: Handling with Radius::AuthSQL
Thu Feb  7 11:18:53 2002: DEBUG: Handling with Radius::AuthSQL:
Thu Feb  7 11:18:53 2002: ERR: Could not connect to SQL database with
DBI->connect dbi:Pg:dbname=radius, radius, rad99:
Thu Feb  7 11:18:53 2002: ERR: Could not connect to any SQL database.
Request is ignored. Backing off for 600 seconds
Thu Feb  7 11:18:58 2002: DEBUG: Packet dump:
*** Received from 127.0.0.1 port 1046 ....
Code:       Accounting-Request
Identifier: 68
Authentic:  <235><6><132><205><27><219><224><1><3><1><149><134><215>#O<175>
Attributes:
        User-Name = "dthaba"
        Service-Type = Framed-User
        NAS-IP-Address = 203.63.154.1
        NAS-Port = 1234
        NAS-Port-Type = Async
        Acct-Session-Id = "00001234"
        Acct-Status-Type = Start
        Called-Station-Id = "123456789"
        Calling-Station-Id = "987654321"

Thu Feb  7 11:18:58 2002: DEBUG: Handling request with Handler
'Realm=DEFAULT'
Thu Feb  7 11:18:58 2002: DEBUG:  Adding session for dthaba, 203.63.154.1,
1234
Thu Feb  7 11:18:58 2002: DEBUG: Handling with Radius::AuthSQL
Thu Feb  7 11:18:58 2002: DEBUG: Handling accounting with Radius::AuthSQL
Thu Feb  7 11:18:58 2002: DEBUG: Accounting accepted
Thu Feb  7 11:18:58 2002: DEBUG: Packet dump:
*** Sending to 127.0.0.1 port 1046 ....
Code:       Accounting-Response
Identifier: 68
Authentic:  <235><6><132><205><27><219><224><1><3><1><149><134><215>#O<175>
Attributes:

Thu Feb  7 11:18:58 2002: DEBUG: Packet dump:
*** Received from 127.0.0.1 port 1046 ....
Code:       Accounting-Request
Identifier: 69
Authentic:  <212><234><11><131><216><236><180>]<1><147><148>~<27>X<148><194>
Attributes:
        User-Name = "dthaba"
        Service-Type = Framed-User
        NAS-IP-Address = 203.63.154.1
        NAS-Port = 1234
        NAS-Port-Type = Async
        Acct-Session-Id = "00001234"
        Acct-Status-Type = Stop
        Called-Station-Id = "123456789"
        Calling-Station-Id = "987654321"
        Acct-Delay-Time = 0
        Acct-Session-Time = 1000
        Acct-Input-Octets = 20000
        Acct-Output-Octets = 30000

Thu Feb  7 11:18:58 2002: DEBUG: Handling request with Handler
'Realm=DEFAULT'
Thu Feb  7 11:18:58 2002: DEBUG:  Deleting session for dthaba, 203.63.154.1,
1234
Thu Feb  7 11:18:58 2002: DEBUG: Handling with Radius::AuthSQL
Thu Feb  7 11:18:58 2002: DEBUG: Handling accounting with Radius::AuthSQL
Thu Feb  7 11:18:58 2002: DEBUG: Accounting accepted
Thu Feb  7 11:18:58 2002: DEBUG: Packet dump:
*** Sending to 127.0.0.1 port 1046 ....
Code:       Accounting-Response
Identifier: 69
Authentic:  <212><234><11><131><216><236><180>]<1><147><148>~<27>X<148><194>
Attributes:



----- Original Message -----
From: Hugh Irvine <hugh at open.com.au>
To: tdn <tdn at tdn.co.ke>; <radiator at open.com.au>
Sent: Wednesday, February 06, 2002 2:31 AM
Subject: Re: (RADIATOR) AuthBy SQL and PostgreSQL

> Hello -
>
> Could you please send me a copy of your configuration file (no secrets)
> together with a trace 4 debug from Radiator showing what is happening.
>
> thanks
>
> Hugh
>
> On Tue, 5 Feb 2002 19:53, tdn wrote:
> > Hi Hugh
> >
> > > The correct syntax for the DBSource line is this:
> > >
> > > DBSource        dbi:Pg:dbname=radius
> >
> > I actually noticed that and rectified, however the problem still occurs
> > when auth by SQL.
> > Authenticating by flat file works OK.
> >
> > > And of course you must install the DBI and DBD modules first.
> >
> > I have pgsql_perl5-1.9.0 for the DBD and DBI-1.201 for the DBI
> >
> >
> >
> > Rgds
> > TDN
> >
> >
> > ----- Original Message -----
> > From: Hugh Irvine <hugh at open.com.au>
> > To: tdn <tdn at tdn.co.ke>; <radiator at open.com.au>
> > Sent: Tuesday, February 05, 2002 1:38 AM
> > Subject: Re: (RADIATOR) AuthBy SQL and PostgreSQL
> >
> > > Hello TDN -
> > >
> > > > Hi,
> > > >
> > > > I'd like to have radiator authenticate users from a Postgres SQL
> >
> > database.
> >
> > > > I get the following error whenever I try to test it using radpwtst.
> > > >
> > > > Can't read $DBI::errstr, last handle unknown or destroyed at
> > > > /usr/local/lib/perl5/site_perl/5.005/Radius/SqlDb.pm line 136
> > > >
> > > > Am running Radiator 2.19 and PostgreSQL 7.1
> > > >
> > > > see part of my radius.cfg
> > > >
> > > > <Realm DEFAULT>
> > > >         #<AuthBy FILE>
> > > > #               # The filename defaults to %D/users
> > > > #       </AuthBy>
> > > >         # Log accounting to the detail file in LogDir
> > > > #       AcctLogFileName %L/detail/detail.%Y%m%d
> > > >         <AuthBy SQL>
> > > >                 DBSource        dbi:pg:dbname=radius
> > > >                 DBUsername      xxx
> > > >                 DBAuth          xxx
> > > >                 AuthSelect select CLEARTEXTPASSWORD from USERS where
> > > > USERID='%n';
> > > >         </AuthBy>
> > > > </Realm>
> > >
> > > The correct syntax for the DBSource line is this:
> > >
> > > DBSource        dbi:Pg:dbname=radius
> > >
> > > And of course you must install the DBI and DBD modules first.
> > >
> > > regards
> > >
> > > Hugh
> > >
> > > --
> > > 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.
>
> --
> 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 radiator-announce at open.com.au
> To unsubscribe, email 'majordomo at open.com.au' with
> 'unsubscribe radiator' in the body of the message.

-------------------------------------------------------

-- 
Mike McCauley                               mikem at open.com.au
Open System Consultants Pty. Ltd            Unix, Perl, Motif, C++, WWW
24 Bateman St Hampton, VIC 3188 Australia   http://www.open.com.au
Phone +61 3 9598-0985                       Fax   +61 3 9598-0955

Radiator: the most portable, flexible and configurable RADIUS server 
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald, 
Platypus, Freeside, TACACS+, PAM, external, Active Directory etc etc 
on Unix, Win95/8, 2000, NT, MacOS 9, MacOS X
===
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.


More information about the radiator mailing list