Exec-Program in acct_users file

Marinko Tarlac mangia81 at gmail.com
Tue Dec 23 15:47:22 CET 2008


I'm using FR 1.1.7 with acct_users but what if you have more complicated
scripts and you're using it on Interim-Updates. Every time when
Interim-Update triggers, this script has to connect to do something
(database connection, do this, do that.... )...

Is there any other way to something like this?

On Tue, Dec 23, 2008 at 11:48 AM, Anton Borisov <antonio at mccinet.ru> wrote:

> Thank you for your reply.
>
> Yes, yes.
> I have uncommented exec in post-auth section in
> /etc/raddb/sites-enabled/default config.
>
>
> So, another way in 2.1.1 - I've configured this program only with
> accounting module.
> Some examples:
>
> /etc/raddb/sites-enabled/default
> accounting {
> ...
> ...
> Acct-Type BILL {
>        if ( Acct-Status-Type =~ /Start|Stop/ ) {
>                dns
>        }
> }
> ...
>
> cat /etc/raddb/modules/exec
> ...
> ...
> exec dns {
>                wait = yes
>                program = "/path-to-my-programm.sh"
>                input_pairs = request
>                output_pairs = reply
> }
>
> This is working, but more quickly and easily only add Exec-Programm to
> acct_users (like in 1.7.7 version)
> Would you be so kind and give some examples for acct_usrs in 2.1.1?
>
>
>
>
>
> Alan DeKok wrote:
>
>> Anton Borisov wrote:
>>
>>> I used Start and Stop in accounting for some DNS registrations of my
>>> clients, like this:
>>>
>>> ~# cat acct_users
>>> ...
>>> ...
>>> DEFAULT         Realm == 'dyndns', Acct-Status-Type == Start, Acct-Type
>>> := BILL
>>>
>> ...
>>
>>> and this works in 1.1.7 !
>>>
>>> But for 2.1.1 - this does not work.
>>>
>>
>>  You need to list the "exec" module in the "post-auth" section.
>>
>>  Alan DeKok.
>> -
>> List info/subscribe/unsubscribe? See
>> http://www.freeradius.org/list/users.html
>>
>
> --
> Yours faithfully,
> Anton Borisov.
>
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20081223/d632e871/attachment.html>


More information about the Freeradius-Users mailing list