Exec and dropped attributes between v2.0 and 3.0
Luke Cameron
lukessi at gmail.com
Wed Dec 4 17:01:30 CET 2019
Hi Alan,
If I run the follow snippet of code it doesn't work. But works as expected
on 2.0.
All I get is a blank entry
Exec-Program-Wait = "/etc/raddb/var.sh %{User-Name} %{Framed-IP-Address}"
/etc/raddb/var.sh
echo "$1" >> /tmp/tempvar.txt
echo "$2" >> /tmp/tempvar.txt
shows the username no Framed IP just blank.
If I do printenv
NAS_PORT=1812
MESSAGE_AUTHENTICATOR=0x8122daeddfe1723def91026630cff460
USER_NAME="testuser"
USER_PASSWORD="xxxxxxr"
HUNTGROUP_NAME="xxx41"
PWD=/etc/raddb/mods-enabled
EVENT_TIMESTAMP="Dec 4 2019 15:37:42 GMT"
NAS_IP_ADDRESS=xxx.xxx.xxx.xxx
SHLVL=1
_=/usr/bin/printenv
But my reply to my test client has Framed-IP-Address.
Have I missed something? I have tried adding %{reply:Framed-IP-Address} as
well still gives a blank output.
On Wed, 4 Dec 2019, 15:35 Alan DeKok, <aland at deployingradius.com> wrote:
> On Dec 4, 2019, at 9:56 AM, Luke Cameron <lukessi at gmail.com> wrote:
> >
> > I am upgrading a V2.0 instance to 3.0... They use EXEC to run a perl
> script
> > which passes in the username and Framed-IP-Address to update there bind
> DNS
> > server of the clients IP.
> >
> > I know Framed-IP-Address Attribute has been dropped.
>
> No it hasn't. It still exists.
>
> > Has anyone got any ideas how can I achieve the same thing?
>
> It should work the same way as in v2.
>
> As always, run the server in debug mode to see what's going on.
>
> Alan DeKok.
>
>
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
More information about the Freeradius-Users
mailing list