[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freeradius-users
Subject:    Re: Execute shell script in older version of FreeRADIUS
From:       Alan DeKok <aland () deployingradius ! com>
Date:       2018-02-28 23:09:16
Message-ID: B9F7EE6F-2D9A-47B4-92DD-A2BF4B1FF960 () deployingradius ! com
[Download RAW message or body]

On Feb 28, 2018, at 2:39 PM, MLists <mlists@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.

  e.g.

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

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

  Alan DeKok.


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic