I need to change the structure of the radusergroup table so it includes the radcheck_id and radgroupcheck_id's. Currently it's set to use the username and groupname. I'm editing the following sections in dialup.conf group_membership_query = "SELECT groupname \ FROM ${usergroup_table} \ WHERE username = '%{SQL-User-Name}' \ ORDER BY priority" However, I need to know if it possible to change SQL-User-Name to use the radcheck id instead? Is it possible to look up the user id prior to this statement running? Ideally, it would then look like this: group_membership_query = "SELECT radgroup_id \ FROM ${usergroup_table} \ WHERE username = '%{SQL-User-ID}' \ ORDER BY priority" If so, where do I do this? -- View this message in context: http://freeradius.1045715.n5.nabble.com/Change-SQL-Groupcheck-Query-in-Dialu... Sent from the FreeRadius - User mailing list archive at Nabble.com.
JennyBlunt wrote:
I need to change the structure of the radusergroup table so it includes the radcheck_id and radgroupcheck_id's.
Why? And even if there is a good reason, it's just SQL...
However, I need to know if it possible to change SQL-User-Name to use the radcheck id instead?
Yes. That's why the queries are editable. So you can edit them,
Is it possible to look up the user id prior to this statement running?
Yes. It's just another SQL query: update request { SQL-User-Id := "%{sql: ...}" }
If so, where do I do this?
In the "authorize" section. Alan DeKok.
Yes, it's a bit annoying.... Our front end management system is / will be built using ruby on rails. RoR seems a little funny with join tables when they don't use IDs. Hence the need for a change to the sql. The same went for the attribute column which we needed to alter too. Have things working fine - thanks for help -- View this message in context: http://freeradius.1045715.n5.nabble.com/Change-SQL-Groupcheck-Query-in-Dialu... Sent from the FreeRadius - User mailing list archive at Nabble.com.
JennyBlunt wrote:
Yes, it's a bit annoying.... Our front end management system is / will be built using ruby on rails.
RoR seems a little funny with join tables when they don't use IDs. Hence the need for a change to the sql. The same went for the attribute column which we needed to alter too.
That's... strange. The IDs aren't used by FreeRADIUS, and can be ignored. The attribute column is just the name of the attribute. Why would it change to anything else?
Have things working fine - thanks for help
It's what we do. Alan DeKok.
participants (2)
-
Alan DeKok -
JennyBlunt