hints file based rewrite does not work (migration from freeradius 1.1.x to 3.0.x)
Alan DeKok
aland at deployingradius.com
Mon Oct 12 14:58:41 CEST 2015
On Oct 12, 2015, at 6:09 AM, Bernd <bernd at kroenchenstadt.de> wrote:
> we're about to move from a freeradius (freeradius-1.1.3-1.6.el5 on CentOS 5) to a HA freeradius (freeradius-3.0.4-6.el7.x86_64 on CentOS 7) environment.
>
> We're almost there, however, I ran into an issue: I have to rewrite an "%" character to "@". My 'hints' file on the old installation did this perfectly well:
>
> DEFAULT User-Name =~ "bla\-bla\/([^%]+)%kroenchenstadt.de"
> User-Name := "%{1}@kroenchenstadt.de"
Don't use "hints" for that. Just put the configuration into the "authorize" section, in "unlang".
if (User-Name =~ /bla\-bla\/([^%]+)%kroenchenstadt.de/) {
update control {
User-Name := "%{1}@kroenchenstadt.de"
}
}
Alan DeKok.
More information about the Freeradius-Users
mailing list