Value-pairs from exec script

Brian Wallen bwallen at gmail.com
Wed Mar 6 16:14:56 CET 2013


I have an exec script that returns a User-Name. FreeRADIUS passes the
User-Name to my script (ie MyOldUsername) and my script changes it (ie
MyNewUsername). In my logs I see

Exec-Program-Wait: value-pairs: User-Name = MyNewUsername


so I know my script is working and returning correctly. My problem is that
FreeRADIUS doesn't take MyNewUsername from the script and MyOldUsername
gets inserted into the radacct table. Below is my exec config. My script is
a PHP script on a web server that gets called via wget. One thing that I'm
not sure of is what input_pairs and output_pairs should be set to. I see
that "config" and "reply" are valid options, but what is the difference
between them? What other information is needed in order to troubleshoot
this problem?

exec {
        wait = yes
        program = `/usr/bin/wget -q -O - 127.0.0.1/%{Calling-Station-Id}`
        shell_escape = yes
        input_pairs = config
        output_pairs = config
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20130306/aa01cb36/attachment.html>


More information about the Freeradius-Users mailing list