Using environment variables in post-auth of freeradius 2.1.x

Matthew Newton mcn at freeradius.org
Fri Aug 3 15:35:49 CEST 2018


On Fri, 2018-08-03 at 15:25 +0200, Simon Meggle wrote:
> I have the situation that the post-auth section of FREERADIUS 2.1.12 

That's ancient. You should upgrade to at least 2.2.10. Preferably v3.


> Is there any chance to smuggle environment variables like $HOSTNAME
> into freeradius 2.x ?

radiusd.conf:

    $INCLUDE local.conf

local.conf:

    local {
      hostname = '...'
    }

wherever:

    if (${local.hostname} == "server1") {
      ...

Then update local.conf to be different on each server.

It works in v3. I *think* it's OK in v2 as well, but nobody here really
cares about v2 any more, it's obsolete.

-- 
Matthew



More information about the Freeradius-Users mailing list