Multiple instances of the exec module

Les Brinkworth lbrinkworth at
Fri Oct 13 15:51:42 CEST 2006

K.  Many thanks for clarifying...


-----Original Message-----
From: at
[ at lists.freeradius.o
rg] On Behalf Of K. Hoercher
Sent: 13 October 2006 14:44 PM
To: FreeRadius users mailing list
Subject: Re: Multiple instances of the exec module

On 10/13/06, Les Brinkworth <lbrinkworth at> wrote:
> How does one define two instances of exec with different names that 
> can be called from other sections?

Aaah, now it gets a bit more clear to me. You should take into account
the comments at the beginning of the modules{} section. That would lead
to something like:

> Code snippet from Modules section of radiusd.conf...
         exec doacctfoo {
>                 wait = yes
>                 program = "handlebillingrequests.exe ACCR:%Z"
>                 input_pairs = request
>                 output_pairs = reply
>                 packet_type = Accounting-Request
>         }
> ...This executes for an accounting request
> If I then add the same code to the authorize section...

ah no, that won't work. you just put it into the modules{} too with
analogous change:

         exec dorequestfoo {
>                 wait = yes
>                 program = "handlebillingrequests.exe AUTR:%Z"
>                 input_pairs = request
>                 output_pairs = reply
>                 packet_type = Access-Request
>         }
> results in the following when I run debug

> radiusd.conf[1527] Unknown module rcode 'wait'.
> radiusd.conf[1513] Failed to parse authorize section.

Ok, that confuses freeradius way to much, as that is not the place to
define module instances (see above), especially when another one (the
unnamed one) already is present.

But you can now put the named defined ones in the appropriate section

authorize {

accounting {

There might be other ways of doing it, (using the same module, but
changing the called program, so it can cope with both tasks
accordingly) but keeping it simple at first and following the
recommendations in the comments looks preferable, at least until you get
some working config.

K. Hoercher
List info/subscribe/unsubscribe? See

More information about the Freeradius-Users mailing list