Quantcast

question about using rlm_python

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

question about using rlm_python

Darshak Thakore
Hi all,
I'm trying to use the rlm_python module in FreeRadius 3.0.X and i've
followed the documentation provided in the Wiki to enable and configure the
module. The basic module seems to be working, i.e after activating the
module in mods-enabled and setting the python_path in mods-enabled/python
and enabling instantiate and authorize, i can see the calls being made to
the instantiate and authorize functions in example.py.

However, then i was trying to enable/import a new module (for example was
trying to use redis to just store some values during authorize). I added
the path of the new module in python_path (
${modconfdir/${.:name}:/usr/local/lib/python2.7/dist-packages} ) I am
unable to even launch freeradius. No matter which module I import, i always
get an error that says

python_function_load - Module 'example' not found
<type 'exceptions.ImportError'> (No module named __future__)
python_function_load - Failed to import python function 'eample.instantiate'
/etc/freeradius/mods-enabled/python[9]: Instantiation failed for module
"python"

How can I setup the rlm_python so that i can import other modules in my
example.py ?

Thanks in advance
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: question about using rlm_python

Herwin Weststrate-2
Darshak Thakore wrote:
> I added the path of the new module in python_path (
> ${modconfdir/${.:name}:/usr/local/lib/python2.7/dist-packages} ) I
> am unable to even launch freeradius

That doesn't look like it should look, the closing "}" should be
directly after modconfdir.
I guess starting freeradius in debug mode would show what it does expand
to, but I'm not sure about that.

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