Accounting with external script

Alan DeKok aland at deployingradius.com
Fri Jan 15 20:17:46 CET 2016


On Jan 15, 2016, at 2:04 PM, mclaut at mclaut.com wrote:
> Sorry, but I can not find the answer to the question - what the external (for example php script) should return to the radius server at accounting?
> What attributes?

  Nothing.  Accounting-Response packets can't contain attributes.
> 
> Fri Jan 15 20:59:54 2016 : Debug: Exec output:
> Fri Jan 15 20:59:54 2016 : Info: [bill_acc] Exec: program returned: 0
> Fri Jan 15 20:59:54 2016 : Info: ++[bill_acc] = ok
> Fri Jan 15 20:59:54 2016 : Info: +} # group preacct = ok

  That's fine.

> Fri Jan 15 20:59:54 2016 : Info:   WARNING: Empty accounting section.  Using default return values.

  You edited the configuration and broke it.  Don't do that.

> I do not understand - WARNING: Empty accounting section. Using default return values.

  You edited the "accounting" section, and deleted all of its contents.  Don't do that.

> But, answer from script:
> 
> Fri Jan 15 20:59:54 2016 : Debug: Exec output:
> Fri Jan 15 20:59:54 2016 : Info: [bill_acc] Exec: program returned: 0
> Fri Jan 15 20:59:54 2016 : Info: ++[bill_acc] = ok
> Fri Jan 15 20:59:54 2016 : Info: +} # group preacct = ok
> 
> And NAS don't recieve any answers from Radius Server....
> 
> Tell me please, what am I doing wrong?

  Put the script into the "accounting" section, not the "preacct" section.

  And PLEASE READ THE CONFIG FILES YOU ARE EDITING.

  They contain documentation for what the "preacct" section does, what the "accounting" section does, etc.  Randomly deleting things is not a good idea.

  Alan DeKok.




More information about the Freeradius-Users mailing list