External script

Alan DeKok aland at deployingradius.com
Mon Apr 27 14:36:42 CEST 2015


On Apr 26, 2015, at 3:21 PM, Amit Butere <amitbutere64 at gmail.com> wrote:
> this is module config..
> exec mpp_check {
>        wait = yes
>        packet_type = Access-Request
>        program = "/usr/bin/php5 -f ${confdir}/check.php %{User-Name}
> %{WISPr-Location-ID}"
>        shell_escape = yes
>        input_pairs = request
>        output_pairs = reply

  The "output_pairs" configuration directive means that the script should print out attributes.  i.e. "Foo = bar".  And those attributes will be parsed, and placed into the "reply" list.
> 
> Mon Apr 27 00:43:14 2015 : Debug: (0) mpp_check :    --> IN-BA-AC-0001
> Mon Apr 27 00:43:14 2015 : ERROR: (0) mpp_check : Failed parsing output
> from: /usr/bin/php5 -f /etc/freeradius/check.php %{User-Name}
> %{WISPr-Location-ID}: Expecting operator
> Mon Apr 27 00:43:14 2015 : ERROR: (0) mpp_check : Program returned code (0)
> and output '1'

  The program prints out a "1" as output.  This isn't an attribute.

  You have 2 choices:

1) delete the "output_pairs = reply" line.  The module will stop looking for attributes in the output

  or

2) make the mpp_check program print out attributes.

> i want to know how i can send module output back to radius as noop or
> module ok

http://networkradius.com/doc/current/raddb/mods-available/exec.html

  See Table 1. Program return codes to module return codes

  Alan DeKok.




More information about the Freeradius-Users mailing list