using groupname in accounting/authorize in deafult

firing neurons firingneurons at
Thu Nov 17 10:57:55 CET 2016


   TL;DR: read last 5 lines.

   I want to use the groupname of the user for which the NAS has sent
   Access/Accouting-Request or Interim update in a sql query (via xlat) in

   I have tired

   groupname='%{Sql-Group}' (this should be the one i think)

   but it always resolves to '' (empty) like the attributes doesn't exist.

   doing Tmp-String-0 := "%{sql: SELECT groupname FROM radusergroup WHERE
   username = '%{User-Name}' ORDER BY priority}"

   will set Tmp-String-0 to the groupname but when i try to use it in
   another query like groupname='%{Tmp-String-0}', it resovles to ''

   Basically I want this to happen:
   for two groups named abc and abc_ex with the same attribute name having
   diffrent vaules of said attribute:

   groupname = '%{Sql-Group}_Ex' resolves to groupname = abc_ex
   groupname = '%{Sql-Group}' resolves to groupname = abc


More information about the Freeradius-Users mailing list