Re: Realms and SQL

2002-12-12 Thread Chris Parker
At 05:57 PM 12/12/2002 +1100, Alan Wong wrote:

Dear all,

I was just wondering when I set up realms through the proxy.conf file how do
I specify when it gets authenticated locally that it will check the SQL
Database. At the moment in the proxy.conf file it has

realm paris {
type  = radius
authhost= LOCAL
accthost= LOCAL
}

I want it to authenticate against the mysql database instead of the user
file currently specified. Sorry I have tried a few different combinations
and have read the mailing list but the threads I have read has either no
responses or responses that are vague.


Not sure what is confusing about it.  And you don't want to actually
authenticate against the mysql database.  What you want to do is retrieve
the users password from the database.

You'll need to add an 'sql' module instance to your 'authorize' block and
remove the 'files' module instance to use one over the other.  You should
not need to change anything in the 'authenticate' block.

-Chris
--
   \\\|||///  \  StarNet Inc.  \ Chris Parker
   \ ~   ~ /   \   WX *is* Wireless!\   Director, Engineering
   | @   @ |\   http://www.starnetwx.net \  (847) 963-0116
oOo---(_)---oOo--\--
  \ Wholesale Internet Services - http://www.megapop.net



- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Realms and SQL

2002-12-11 Thread Alan Wong
Dear all,

I was just wondering when I set up realms through the proxy.conf file how do
I specify when it gets authenticated locally that it will check the SQL
Database. At the moment in the proxy.conf file it has

realm paris {
type  = radius
authhost= LOCAL
accthost= LOCAL
}

I want it to authenticate against the mysql database instead of the user
file currently specified. Sorry I have tried a few different combinations
and have read the mailing list but the threads I have read has either no
responses or responses that are vague.

Thanks in advance,
Alan



- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html



Realms and sql data updates/insert

2002-06-11 Thread Carlo Varnero

First of all i apologize for my english.
I've just one question about a difference between freeradius-05 and the
latest CVS:
when the radius recievs an Accounting-Request using the latest CVS it
doesn't insert anything in the Realm column in the mysql raddact table
whereas freeradius-05 does; is this a correct behavior or is something wrong
in my configuration?

latest CVS:
rad_recv: Accounting-Request packet from host 80.17.211.37:32800, id=64,
length=231
User-Name = [EMAIL PROTECTED]
NAS-IP-Address = 151.99.57.68
Ascend-Owner-IP-Addr = 151.99.57.68
NAS-Port = 1103
Ascend-NAS-Port-Format = 4
NAS-Port-Type = Async
Service-Type = Framed-User
Acct-Status-Type = Start
Acct-Delay-Time = 0
Acct-Session-Id = 368281981
Acct-Authentic = RADIUS
Ascend-Auth-Delay = 20
Ascend-Multilink-ID = 960798017
Ascend-Num-In-Multilink = 1
Acct-Link-Count = 1
Acct-Multi-Session-Id = 39449d41
Ascend-Modem-PortNo = 67
Ascend-Modem-SlotNo = 10
Ascend-Modem-ShelfNo = 1
Calling-Station-Id = 2877843
Called-Station-Id = 239370423
Framed-Protocol = MP
Framed-IP-Address = 80.104.27.184
modcall: entering group preacct
rlm_realm: Looking up realm ecs.net for User-Name = [EMAIL PROTECTED]
rlm_realm: Found realm ecs.net
rlm_realm: Adding Stripped-User-Name = tony
  rlm_realm: Proxying request from user tony to realm ecs.net
rlm_realm:  Accounting realm is LOCAL.
rlm_realm:  acct_port is not set.  proxy cancelled
  modcall[preacct]: module suffix returns noop
  modcall[preacct]: module preprocess returns noop
modcall: group preacct returns noop
modcall: entering group accounting
rlm_acct_unique: Hashing ',Client-IP-Address = 80.17.211.37,NAS-IP-Address =
151.99.57.68,Acct-Session-Id = 368281981,User-Name = [EMAIL PROTECTED]'
rlm_acct_unique: Acct-Unique-Session-ID = 6477d4a0e400d6c6.
  modcall[accounting]: module acct_unique returns ok
radius_xlat:  'tony'
sql_set_user:  escaped user -- 'tony'
radius_xlat:  'INSERT into radacct (RadAcctId, AcctSessionId, AcctUniqueId,
UserName, Realm, NASIPAddress, NASPortId, NASPortType, AcctStartTime,
AcctStopTime, AcctSessionTime, AcctAuthentic, ConnectInfo_start,
ConnectInfo_stop, AcctInputOctets, AcctOutputOctets, CalledStationId,
CallingStationId, AcctTerminateCause,
ServiceType, FramedProtocol, FramedIPAddress, AcctStartDelay, AcctStopDelay)
values('', '368281981', '6477d4a0e400d6c6', 'tony', '', '151.99.57.68', '',
'Async', '2002-06-11 09:28:36', '0', '0', 'RADIUS', '', '', '0', '0',
'239370423', '2877843', '', 'Framed-User', 'MP', '80.104.27.184', '0', '0')'
rlm_sql: Reserving sql socket id: 4

freeradius-05:
modcall: entering group preacct
  modcall[preacct]: module suffix returns ok
  modcall[preacct]: module preprocess returns noop
modcall: group preacct returns ok
modcall: entering group accounting
rlm_acct_unique: Hashing ',Client-IP-Address = 80.17.211.37,NAS-IP-Address =
151.99.57.68,Acct-Session-Id = 368262232,User-Name = [EMAIL PROTECTED]'
rlm_acct_unique: Acct-Unique-Session-ID = e655aba61c3dd06b.
  modcall[accounting]: module acct_unique returns ok
radius_xlat:  'tony'
sql_escape in:  'tony'
sql_escape out:  'tony'
sql_set_user:  escaped user -- 'tony'
radius_xlat:  'INSERT into radacct (RadAcctId, AcctSessionId, AcctUniqueId,
UserName, Realm, NASIPAddress, NASPortId, NASPortType, AcctStartTime,
AcctStopTime, AcctSessionTime, AcctAuthentic, ConnectInfo_start,
ConnectInfo_stop, AcctInputOctets, AcctOutputOctets, CalledStationId,
CallingStationId, AcctTerminateCause, ServiceType, FramedProtocol,
FramedIPAddress, AcctStartDelay, AcctStopDelay) values('', '368262232',
'e655aba61c3dd06b', 'tony', 'ecs.net', '151.99.57.68', '', 'Async',
'2002-06-07 15:49:12', '0', '0', 'RADIUS', '', '', '0', '0', '239370423',
'2877843', '', 'Framed-User', 'MP', '80.104.27.101', '0', '0')'
rlm_sql: Reserving sql socket id: 4
query:  INSERT into radacct (RadAcctId, AcctSessionId, AcctUniqueId,
UserName, Realm, NASIPAddress, NASPortId, NASPortType, AcctStartTime,
AcctStopTime, AcctSessionTime, AcctAuthentic, ConnectInfo_start,
ConnectInfo_stop, AcctInputOctets, AcctOutputOctets, CalledStationId,
CallingStationId, AcctTerminateCause, ServiceType, FramedProtocol,
FramedIPAddress, AcctStartDelay, AcctStopDelay) values('', '368262232',
'e655aba61c3dd06b', 'tony', 'ecs.net', '151.99.57.68', '', 'Async',
'2002-06-07 15:49:12', '0', '0', 'RADIUS', '', '', '0', '0', '239370423',
'2877843', '', 'Framed-User', 'MP', '80.104.27.101', '0', '0')


- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html