Freeradius not to read radgroupcheck table from MSSQL
Hello, My Freeradius seems only to read radcheck table, not to read radgroupcheck table from MS SQL. Here is my settings: In /mssql/dialup.conf, I edit two queries for authorized_check_query and authorize_group_check_query, instead of using the default ones. Doing this is easy for our database programming. authorize_check_query = "RADIUS_authorize_check_query '%{SQL-User-Name}'" authorize_group_check_query = "RADIUS_authorize_group_check_query '%{SQL-User-Name}'" in sql.conf, read_group is set to yes. Then I suppose Freeradius should start to read group tables. When I test a user whose username is associated to a group name and pool-name, Freeradius returns only authentication successful, but no group info or IP is returned. Here is the debug: rad_recv: Access-Request packet from host 172.16.1.5 port 1723, id=20, length=57 User-Name = "dr.julien.olivier" User-Password = "acdq" +- entering group authorize ++[preprocess] returns ok ++[chap] returns noop ++[mschap] returns noop rlm_realm: No '@' in User-Name = "dr.julien.olivier", looking up realm NULL rlm_realm: No such realm "NULL" ++[suffix] returns noop rlm_eap: No EAP-Message, not doing EAP ++[eap] returns noop ++[unix] returns notfound ++[files] returns noop expand: %{User-Name} -> dr.julien.olivier rlm_sql (sql): sql_set_user escaped user --> 'dr.julien.olivier' rlm_sql (sql): Reserving sql socket id: 2 expand: RADIUS_authorize_check_query '%{SQL-User-Name}' -> RADIUS_authorize_check_query 'dr.julien.olivier' query: RADIUS_authorize_check_query 'dr.julien.olivier' rlm_sql (sql): User found in radcheck table expand: SELECT id,UserName,Attribute,Value,op FROM radreply WHERE Username = '%{SQL-User-Name}' ORDER BY id -> SELECT id,UserName,Attribute,Value,op FROM radreply WHERE Username = 'dr.julien.olivier' ORDER BY id query: SELECT id,UserName,Attribute,Value,op FROM radreply WHERE Username = 'dr.julien.olivier' ORDER BY id rlm_sql (sql): Released sql socket id: 2 ++[sql] returns ok ++[expiration] returns noop ++[logintime] returns noop ++[pap] returns updated rad_check_password: Found Auth-Type auth: type "PAP" +- entering group PAP rlm_pap: login attempt with password "acdq" rlm_pap: Using clear text password "acdq" rlm_pap: User authenticated successfully ++[pap] returns ok +- entering group post-auth rlm_ippool: Could not find Pool-Name attribute. ++[netplus] returns noop rlm_ippool: Could not find Pool-Name attribute. ++[staffnet] returns noop rlm_ippool: Could not find Pool-Name attribute. ++[julienne] returns noop rlm_sql (sql): Processing sql_postauth expand: %{User-Name} -> dr.julien.olivier rlm_sql (sql): sql_set_user escaped user --> 'dr.julien.olivier' ++[sql] returns noop Sending Access-Accept of id 20 to 172.16.1.5 port 1723 Finished request 122. Going to the next request Waking up in 4.9 seconds. Cleaning up request 122 ID 20 with timestamp +79236 Ready to process requests. I don't know where I set it wrong or anything I miss to configure. I mean if radcheck table works, it means at least the query that I changed is working. So I don't know with the same idea, why radgroupcheck does not work. Could anyone give me some ideas? Thanks so much XJ
In /mssql/dialup.conf, I edit two queries for authorized_check_query and authorize_group_check_query, instead of using the default ones. Doing this is easy for our database programming.
authorize_check_query = "RADIUS_authorize_check_query '%{SQL-User-Name}'"
authorize_group_check_query = "RADIUS_authorize_group_check_query '%{SQL-User-Name}'"
Shouldn't there be a group_membership_query as well? And group check query depending on SQL-Group? Ivan Kalik Kalik Informatika ISP
Hello Ivan, I cannot find out where to configure group_membership_query. Should I see group check table being read in debug? Thanks in advance XJ -----Original Message----- From: freeradius-users-bounces+xjing=datavalet.com@lists.freeradius.org [mailto:freeradius-users-bounces+xjing=datavalet.com@lists.freeradius.org] On Behalf Of tnt@kalik.net Sent: Friday, October 17, 2008 11:23 AM To: FreeRadius users mailing list Subject: Re: Freeradius not to read radgroupcheck table from MSSQL
In /mssql/dialup.conf, I edit two queries for authorized_check_query and authorize_group_check_query, instead of using the default ones. Doing this is easy for our database programming.
authorize_check_query = "RADIUS_authorize_check_query '%{SQL-User-Name}'"
authorize_group_check_query = "RADIUS_authorize_group_check_query '%{SQL-User-Name}'"
Shouldn't there be a group_membership_query as well? And group check query depending on SQL-Group? Ivan Kalik Kalik Informatika ISP - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Try authorize queries from mysql/dialup.conf. Perhaps mssql/dialup.conf hasn't been updated. They look like 1.1.x to me. Ivan Kalik Kalik Informatika ISP Dana 17/10/2008, "Xiaochen Jing" <xjing@datavalet.com> piše:
Hello Ivan,
I cannot find out where to configure group_membership_query. Should I see group check table being read in debug?
Thanks in advance
XJ
-----Original Message----- From: freeradius-users-bounces+xjing=datavalet.com@lists.freeradius.org [mailto:freeradius-users-bounces+xjing=datavalet.com@lists.freeradius.org] On Behalf Of tnt@kalik.net Sent: Friday, October 17, 2008 11:23 AM To: FreeRadius users mailing list Subject: Re: Freeradius not to read radgroupcheck table from MSSQL
In /mssql/dialup.conf, I edit two queries for authorized_check_query and authorize_group_check_query, instead of using the default ones. Doing this is easy for our database programming.
authorize_check_query = "RADIUS_authorize_check_query '%{SQL-User-Name}'"
authorize_group_check_query = "RADIUS_authorize_group_check_query '%{SQL-User-Name}'"
Shouldn't there be a group_membership_query as well? And group check query depending on SQL-Group?
Ivan Kalik Kalik Informatika ISP
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Hi Ivan, 1. Is there a place that I should tell Freeradius to use mysql/dialup.conf instead of mssql/dialup.conf? But I am really using MS SQL as database. 2. How can I update dialup.conf? Does it work if I make install directly version 2.1.1 on the system? Thanks in advance XJ -----Original Message----- From: freeradius-users-bounces+xjing=datavalet.com@lists.freeradius.org [mailto:freeradius-users-bounces+xjing=datavalet.com@lists.freeradius.org] On Behalf Of tnt@kalik.net Sent: Friday, October 17, 2008 6:45 PM To: FreeRadius users mailing list Subject: RE: Freeradius not to read radgroupcheck table from MSSQL Try authorize queries from mysql/dialup.conf. Perhaps mssql/dialup.conf hasn't been updated. They look like 1.1.x to me. Ivan Kalik Kalik Informatika ISP Dana 17/10/2008, "Xiaochen Jing" <xjing@datavalet.com> piše:
Hello Ivan,
I cannot find out where to configure group_membership_query. Should I see group check table being read in debug?
Thanks in advance
XJ
-----Original Message----- From: freeradius-users-bounces+xjing=datavalet.com@lists.freeradius.org [mailto:freeradius-users-bounces+xjing=datavalet.com@lists.freeradius.org] On Behalf Of tnt@kalik.net Sent: Friday, October 17, 2008 11:23 AM To: FreeRadius users mailing list Subject: Re: Freeradius not to read radgroupcheck table from MSSQL
In /mssql/dialup.conf, I edit two queries for authorized_check_query and authorize_group_check_query, instead of using the default ones. Doing this is easy for our database programming.
authorize_check_query = "RADIUS_authorize_check_query '%{SQL-User-Name}'"
authorize_group_check_query = "RADIUS_authorize_group_check_query '%{SQL-User-Name}'"
Shouldn't there be a group_membership_query as well? And group check query depending on SQL-Group?
Ivan Kalik Kalik Informatika ISP
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Hi,
Hi Ivan,
1. Is there a place that I should tell Freeradius to use mysql/dialup.conf instead of mssql/dialup.conf? But I am really using MS SQL as database.
no. if you use MSSQL then use MSSQL files - what you will need to do is edit mssql/dialup.conf so that the queries that mysql/dialup.conf use are present - but with the correct MSSQL context and syntax! alan
1. Is there a place that I should tell Freeradius to use mysql/dialup.conf instead of mssql/dialup.conf? But I am really using MS SQL as database.
Don't do that. mssql database needs mssql driver.
2. How can I update dialup.conf? Does it work if I make install directly version 2.1.1 on the system?
Copy/paste those two group (membership and check) queries from mysql/dialup.conf to mssql/dialup.conf and comment out the existing group check query. No installation needed. New queries will be read when you start the server. Ivan Kalik Kalik Informatika ISP
participants (3)
-
A.L.M.Buxey@lboro.ac.uk -
tnt@kalik.net -
Xiaochen Jing