Client-Shortname Attribute can only be queried, and cannot be assigned.

Jonathan Davis jonathan at prioritycolo.com
Fri Aug 27 23:29:05 CEST 2021


I was scratching my head to understand why, in the authorize section of 
a virtual server, this worked:

switch Client-Shortname {
       case radiusd_a1_01 {
               update control {
                       Pam-Auth := radiusd_a1_01
               }
       }
       case radiusd_b1_01 {
               update control {
                       Pam-Auth := radiusd_b1_01
               }
       }
}


But this did not:

update control {
         Pam-Auth := Client-Shortname
}


And remembering my previous question, started combing through the docs 
on unlang, attributes, and hit on run-time variables where it says 
Client-Shortname is a meta-attributes that can only be queried, and 
cannot be assigned. Which I take it is why the second one does not work?


I can keep going with the switch case, but I am wondering if this is the 
a bad solution? Can attributes or variables be set at the client level 
which are accessible? Should I use a dictionary option? I know I need to 
dig deeper, but a nudge (either towards good, or away from bad) would be 
appreciated.

Enjoy the weekend,

  Jonathan




More information about the Freeradius-Users mailing list