Gents,
so long as you are using FR 2.1.x then you shouldnt > need to do that - just simply edit experimental.conf > to make sure the python stuff is active and then edit > radiusd.conf to make sure that experimental.conf is included > (you did compile FR with experimental modules enabled?) > > then you should be able to call python in the postauth section > I'm running FR 2.1.4. My configure was : > ./configure --with-experimental-modules > I deleted my python under modules. I did, in the radiusd.conf file : > $INCLUDE experimental.conf > I can see the following line in the log : > including configuration file /usr/local/etc/raddb/experimental.conf > And I left it has it was, so in it, I have : > python { > mod_instantiate = radiusd_test > func_instantiate = instantiate > > mod_authorize = radiusd_test > func_authorize = authorize > > mod_accounting = radiusd_test > func_accounting = accounting > > mod_preproxy = radiusd_test > func_preproxy = preproxy > > mod_postproxy = radiusd_test > func_postproxy = postproxy > > mod_postauth = radiusd_test > func_postauth = postauth > > mod_detach = radiusd_test > func_detach = detach > } > > Now, I restarted the server and I have the following. Note that to make sure I was in the right section, I added the following lines in the "post-auth" section of the "site-enabled/default" file : The echo_NAS_Info is a test I made copying the echo module under the "modules" folder > echo_NAS_Info > python > > The result : Module: Checking post-auth {...} for more modules to load > Module: Instantiating echo_NAS_Info > exec echo_NAS_Info { > wait = yes > program = "/bin/echo %{User-Name}, %{NAS-IP-Address}, %{NAS-Port} " > input_pairs = "request" > output_pairs = "reply" > shell_escape = yes > } > /usr/local/etc/raddb/sites-enabled/default[422]: Failed to find module > "python". > /usr/local/etc/raddb/sites-enabled/default[380]: Errors parsing post-auth > section. > } > Now it looks like I have a configuration error and not a python module error. Do I have to add more than I replaced python with example in the default file and I have the same result for "example" I verified my /usr/local/lib/ and I have the : rlm_example* files rlm_python* files Seeing that echo_NAS_Info loads, i suspect there is something else that has to be done in order to activate de experimental modules/config. When you say, simply edit experimental.conf, should I change something in it, or by default it should be ok ? The only thing I did is modifiy the radiusd.conf file to add the include line. The python section of the experimental.conf file is uncommented by default. -- Philippe-Alexandre Lemelin
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html