sqlippool
Nadir Aliyev
nadir at ultel.net
Fri Dec 11 11:55:07 CET 2009
Hello All,
I have problems with ip pool. I use sqlippool on my
configuration (postgresqlippool.conf included to radiusd.conf and sqlippool
added to my default configuration file which in enabled-site directory)
But i receive errors that server cannot define ip for client or
[sqlippool] No Pool-Name defined. :(
Here is my radiusd -X
..........................
Listening on authentication address * port
1812
Listening on accounting address * port 1813
Listening on command file
/var/run/radiusd/radiusd.sock
Listening on proxy address * port 1814
Ready
to process requests.
rad_recv: Access-Request packet from host 10.10.1.1
port 1645, id=118, length=163
Cisco-AVPair =
"client-mac-address=0030.05e3.e538"
Framed-Protocol = PPP
User-Name =
"testuser"
CHAP-Password = 0x0161a6e63fa662b05f9e996a2bbd95fff7
NAS-Port-Type = Ethernet
NAS-Port = 464
NAS-Port-Id = "0/0/0/500"
Service-Type = Framed-User
NAS-IP-Address = 10.10.1.1
Acct-Session-Id =
"000001D0"
NAS-Identifier = "my-cisco-bras"
+- entering group authorize
{...}
++[preprocess] returns ok
[chap] Setting 'Auth-Type := CHAP'
++[chap]
returns ok
[sql] expand: %{User-Name} -> testuser
[sql] sql_set_user
escaped user --> 'testuser'
rlm_sql (sql): Reserving sql socket id: 4
[sql]
expand: SELECT * FROM check_user_with_mac('%{SQL-User-Name}',
'%{Cisco-AVPair[0]}', '%{NAS-Port-Id}') AS foo(id int, UserName character
varying, Attribute character varying, Value character varying, Op character
varying) -> SELECT * FROM check_user_with_mac('testuser',
'client-mac-address=3D0030.05e3.e538', '0/0/0/500') AS foo(id int, UserName
character varying, Attribute character varying, Value character varying, Op
character varying)
rlm_sql_postgresql: query: SELECT * FROM
check_user_with_mac('testuser', 'client-mac-address=3D0030.05e3.e538',
'0/0/0/500') AS foo(id int, UserName character varying, Attribute character
varying, Value character varying, Op character varying)
rlm_sql_postgresql:
Status: PGRES_TUPLES_OK
rlm_sql_postgresql: query affected rows = 1 ,
fields = 5
WARNING: Found User-Password == "...".
WARNING: Are you sure you
don't mean Cleartext-Password?
WARNING: See "man rlm_pap" for more
information.
[sql] User found in radcheck table
[sql] expand: select * from
get_user_attributes('%{SQL-User-Name}') order by id -> select * from
get_user_attributes('testuser') order by id
rlm_sql_postgresql: query:
select * from get_user_attributes('testuser') order by
id
rlm_sql_postgresql: Status: PGRES_TUPLES_OK
rlm_sql_postgresql: query
affected rows = 4 , fields = 5
[sql] expand: SELECT GroupName FROM
usergroup WHERE UserName='%{SQL-User-Name}' -> SELECT GroupName FROM
usergroup WHERE UserName='testuser'
rlm_sql_postgresql: query: SELECT
GroupName FROM usergroup WHERE UserName='testuser'
rlm_sql_postgresql:
Status: PGRES_TUPLES_OK
rlm_sql_postgresql: query affected rows = 1 ,
fields = 1
[sql] expand: SELECT radgroupcheck.id, radgroupcheck.GroupName,
radgroupcheck.Attribute, radgroupcheck.Value,radgroupcheck.Op FROM
radgroupcheck, usergroup WHERE usergroup.Username = '%{SQL-User-Name}' AND
usergroup.GroupName = radgroupcheck.GroupName ORDER BY radgroupcheck.id ->
SELECT radgroupcheck.id, radgroupcheck.GroupName, radgroupcheck.Attribute,
radgroupcheck.Value,radgroupcheck.Op FROM radgroupcheck, usergroup WHERE
usergroup.Username = 'testuser' AND usergroup.GroupName =
radgroupcheck.GroupName ORDER BY radgroupcheck.id
rlm_sql_postgresql:
query: SELECT radgroupcheck.id, radgroupcheck.GroupName,
radgroupcheck.Attribute, radgroupcheck.Value,radgroupcheck.Op FROM
radgroupcheck, usergroup WHERE usergroup.Username = 'testuser' AND
usergroup.GroupName = radgroupcheck.GroupName ORDER BY
radgroupcheck.id
rlm_sql_postgresql: Status:
PGRES_TUPLES_OK
rlm_sql_postgresql: query affected rows = 0 , fields =
5
[sql] User found in group ActiveUsers
[sql] expand: SELECT
radgroupreply.id, radgroupreply.GroupName, radgroupreply.Attribute,
radgroupreply.Value, radgroupreply.Op FROM radgroupreply,usergroup WHERE
usergroup.Username = '%{SQL-User-Name}' AND usergroup.GroupName =
radgroupreply.GroupName ORDER BY radgroupreply.id -> SELECT
radgroupreply.id, radgroupreply.GroupName, radgroupreply.Attribute,
radgroupreply.Value, radgroupreply.Op FROM radgroupreply,usergroup WHERE
usergroup.Username = 'testuser' AND usergroup.GroupName =
radgroupreply.GroupName ORDER BY radgroupreply.id
rlm_sql_postgresql:
query: SELECT radgroupreply.id, radgroupreply.GroupName,
radgroupreply.Attribute, radgroupreply.Value, radgroupreply.Op FROM
radgroupreply,usergroup WHERE usergroup.Username = 'testuser' AND
usergroup.GroupName = radgroupreply.GroupName ORDER BY
radgroupreply.id
rlm_sql_postgresql: Status:
PGRES_TUPLES_OK
rlm_sql_postgresql: query affected rows = 0 , fields =
5
rlm_sql (sql): Released sql socket id: 4
++[sql] returns ok
Found
Auth-Type =
CHAP
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!
Replacing User-Password in config items with Cleartext-Password.
!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!
Please update your configuration so that the "known good" !!!
!!! clear
text password is in Cleartext-Password, and not in User-Password.
!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+-
entering group CHAP {...}
[chap] login attempt by "testuser" with CHAP
password
[chap] Using clear text password "testuser" for user testuser
authentication.
[chap] chap user testuser authenticated
succesfully
++[chap] returns ok
Login OK: [testuser/] (from client TESTNAS
port 464)
+- entering group post-auth {...}
[SQLIPPOOL] NO POOL-NAME
DEFINED.
[sqlippool] expand: ->
++[sqlippool] returns noop
[sql] expand:
%{User-Name} -> testuser
[sql] sql_set_user escaped user -->
'testuser'
[sql] WARNING: Deprecated conditional expansion ":-". See "man
unlang" for details
[sql] expand: INSERT INTO radpostauth (username, pass,
reply, authdate) VALUES ('%{User-Name}', '%{User-Password:-Chap-Password}',
'%{reply:Packet-Type}', NOW()) -> INSERT INTO radpostauth (username, pass,
reply, authdate) VALUES ('testuser', 'Chap-Password', 'Access-Accept',
NOW())
[sql] expand: /var/log/sqltrace.sql -> /var/log/sqltrace.sql
rlm_sql
(sql) in sql_postauth: query is INSERT INTO radpostauth (username, pass,
reply, authdate) VALUES ('testuser', 'Chap-Password', 'Access-Accept',
NOW())
rlm_sql (sql): Reserving sql socket id: 3
rlm_sql_postgresql: query:
INSERT INTO radpostauth (username, pass, reply, authdate) VALUES
('testuser', 'Chap-Password', 'Access-Accept', NOW())
rlm_sql_postgresql:
Status: PGRES_COMMAND_OK
rlm_sql_postgresql: query affected rows =
1
rlm_sql (sql): Released sql socket id: 3
++[sql] returns ok
[sql_log]
Processing sql_log_postauth
[sql_log] expand: %{User-Name} ->
testuser
[sql_log] expand: %{%{User-Name}:-DEFAULT} -> testuser
[sql_log]
sql_set_user escaped user --> 'testuser'
[sql_log] WARNING: Deprecated
conditional expansion ":-". See "man unlang" for details
[sql_log] expand:
INSERT INTO radpostauth (username, pass, reply, authdate) VALUES
('%{User-Name}', '%{User-Password:-Chap-Password}', '%{reply:Packet-Type}',
'%S'); -> INSERT INTO radpostauth (username, pass, reply, authdate) VALUES
('testuser', 'Chap-Password', 'Access-Accept', '2009-12-11
14:40:07');
[sql_log] expand: /var/log/radacct/sql-relay ->
/var/log/radacct/sql-relay
++[sql_log] returns ok
++[exec] returns
noop
Sending Access-Accept of id 118 to 10.10.1.1 port 1645
Cisco-AVPair
+= "lcp:interface-config#1=rate-limit input 1024000 128000 128000
conform-action transmit exceed-action drop"
Cisco-AVPair +=
"lcp:interface-config#2=rate-limit output 8192000 1024000 1024000
conform-action transmit exceed-action drop"
Port-Limit := 1
Session-Timeout := 172800
Finished request 0.
Going to the next
request
Waking up in 4.9 seconds.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20091211/8f8a298a/attachment.html>
More information about the Freeradius-Users
mailing list