<p>Hello All,</p>
<p>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)</p>
<p>But i receive errors that server cannot define ip for client or [sqlippool] No Pool-Name defined. :(</p>
<p> </p>
<p>Here is my radiusd -X</p>
<p>..........................<br />Listening on authentication address * port 1812<br />Listening on accounting address * port 1813<br />Listening on command file /var/run/radiusd/radiusd.sock<br />Listening on proxy address * port 1814<br />Ready to process requests.<br /><br /><br /><br />rad_recv: Access-Request packet from host 10.10.1.1 port 1645, id=118, length=163<br /> Cisco-AVPair = "client-mac-address=0030.05e3.e538"<br /> Framed-Protocol = PPP<br /> User-Name = "testuser"<br /> CHAP-Password = 0x0161a6e63fa662b05f9e996a2bbd95fff7<br /> NAS-Port-Type = Ethernet<br /> NAS-Port = 464<br /> NAS-Port-Id = "0/0/0/500"<br /> Service-Type = Framed-User<br /> NAS-IP-Address = 10.10.1.1<br /> Acct-Session-Id = "000001D0"<br /> NAS-Identifier = "my-cisco-bras"<br />+- entering group authorize {...}<br />++[preprocess] returns ok<br />[chap] Setting 'Auth-Type := CHAP'<br />++[chap] returns ok<br />[sql] expand: %{User-Name} -> testuser<br />[sql] sql_set_user escaped user --> 'testuser'<br />rlm_sql (sql): Reserving sql socket id: 4<br />[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)<br />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)<br />rlm_sql_postgresql: Status: PGRES_TUPLES_OK<br />rlm_sql_postgresql: query affected rows = 1 , fields = 5<br /><strong>WARNING: Found User-Password == "...".<br />WARNING: Are you sure you don't mean Cleartext-Password?<br />WARNING: See "man rlm_pap" for more information.</strong><br />[sql] User found in radcheck table<br />[sql] expand: select * from get_user_attributes('%{SQL-User-Name}') order by id -> select * from get_user_attributes('testuser') order by id<br />rlm_sql_postgresql: query: select * from get_user_attributes('testuser') order by id<br />rlm_sql_postgresql: Status: PGRES_TUPLES_OK<br />rlm_sql_postgresql: query affected rows = 4 , fields = 5<br />[sql] expand: SELECT GroupName FROM usergroup WHERE UserName='%{SQL-User-Name}' -> SELECT GroupName FROM usergroup WHERE UserName='testuser'<br />rlm_sql_postgresql: query: SELECT GroupName FROM usergroup WHERE UserName='testuser'<br />rlm_sql_postgresql: Status: PGRES_TUPLES_OK<br />rlm_sql_postgresql: query affected rows = 1 , fields = 1<br />[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<br />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<br />rlm_sql_postgresql: Status: PGRES_TUPLES_OK<br />rlm_sql_postgresql: query affected rows = 0 , fields = 5<br />[sql] User found in group ActiveUsers<br />[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<br />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<br />rlm_sql_postgresql: Status: PGRES_TUPLES_OK<br />rlm_sql_postgresql: query affected rows = 0 , fields = 5<br />rlm_sql (sql): Released sql socket id: 4<br />++[sql] returns ok<br />Found Auth-Type = CHAP<br /><strong>!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!<br />!!! Replacing User-Password in config items with Cleartext-Password. !!!<br />!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!<br />!!! Please update your configuration so that the "known good" !!!<br />!!! clear text password is in Cleartext-Password, and not in User-Password. !!!<br />!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!</strong><br />+- entering group CHAP {...}<br />[chap] login attempt by "testuser" with CHAP password<br />[chap] Using clear text password "testuser" for user testuser authentication.<br />[chap] chap user testuser authenticated succesfully<br />++[chap] returns ok<br />Login OK: [testuser/<CHAP-Password>] (from client TESTNAS port 464)<br />+- entering group post-auth {...}<br /><strong>[sqlippool] No Pool-Name defined.</strong><br />[sqlippool] expand: -> <br />++[sqlippool] returns noop<br />[sql] expand: %{User-Name} -> testuser<br />[sql] sql_set_user escaped user --> 'testuser'<br />[sql] WARNING: Deprecated conditional expansion ":-". See "man unlang" for details<br />[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())<br />[sql] expand: /var/log/sqltrace.sql -> /var/log/sqltrace.sql<br />rlm_sql (sql) in sql_postauth: query is INSERT INTO radpostauth (username, pass, reply, authdate) VALUES ('testuser', 'Chap-Password', 'Access-Accept', NOW())<br />rlm_sql (sql): Reserving sql socket id: 3<br />rlm_sql_postgresql: query: INSERT INTO radpostauth (username, pass, reply, authdate) VALUES ('testuser', 'Chap-Password', 'Access-Accept', NOW())<br />rlm_sql_postgresql: Status: PGRES_COMMAND_OK<br />rlm_sql_postgresql: query affected rows = 1<br />rlm_sql (sql): Released sql socket id: 3<br />++[sql] returns ok<br />[sql_log] Processing sql_log_postauth<br />[sql_log] expand: %{User-Name} -> testuser<br />[sql_log] expand: %{%{User-Name}:-DEFAULT} -> testuser<br />[sql_log] sql_set_user escaped user --> 'testuser'<br />[sql_log] WARNING: Deprecated conditional expansion ":-". See "man unlang" for details<br />[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');<br />[sql_log] expand: /var/log/radacct/sql-relay -> /var/log/radacct/sql-relay<br />++[sql_log] returns ok<br />++[exec] returns noop<br />Sending Access-Accept of id 118 to 10.10.1.1 port 1645<br /> Cisco-AVPair += "lcp:interface-config#1=rate-limit input 1024000 128000 128000 conform-action transmit exceed-action drop"<br /> Cisco-AVPair += "lcp:interface-config#2=rate-limit output 8192000 1024000 1024000 conform-action transmit exceed-action drop"<br /> Port-Limit := 1<br /> Session-Timeout := 172800<br />Finished request 0.<br />Going to the next request<br />Waking up in 4.9 seconds.</p>