Execute shell script in older version of FreeRADIUS

Alan DeKok aland at deployingradius.com
Thu Mar 1 00:09:16 CET 2018

On Feb 28, 2018, at 2:39 PM, MLists <mlists at starmania.net> wrote:
> I’m hoping someone can give me a helping hand.  I’ve got an older version of FreeRADIUS (2.2.0) running on an internal legacy system.  The server is scheduled to be replaced by the summer so at this point it would be a waste to try to upgrade it.  I do however need to make a change to the configuration to hack for a requirement of the server that’s being replaced first… and I’ve been kind of going/googling around in circles.  Have tried 4 or 5 different things that I’ve found but I think a few of them may be for newer versions of FreeRADIUS… and the ones I thought were old enough didn’t accomplish anything either 😊

  You should upgrade to 2.2.10.  It has a number of fixes, and it's 100% compatible with 2.2.0.

> Essentially what I need to do is run one script after a user is authenticated to which will extract the username and the IP address they’ve been assigned  (and possibly the NAS IP/port) (in the current test script this info is just echoed to a file so that I can tell when it’s working).   And then a different script (with the same parameters) when they log off.  From reading I’m guessing accounting-start and accounting-stop is the point where I want to be doing this, but I’m open to input on that as well if there’s somewhere more appropriate.
> What is the best/right way to accomplish this in FreeRADIUS 2.2.0?

  See raddb/modules/exec, or raddb/modules/echo

  You can run arbitrary programs using those modules.


	if (Acct-Status-Type == Stop) {

  Just copy "echo" to another file, and change the name "echo" to something else.

  Alan DeKok.

More information about the Freeradius-Users mailing list