RLM_Python on Freeradius 3
Azeem Mohammed
mohd.azeem at bankofloyal.com
Mon Oct 31 15:40:39 CET 2016
I have radius 3.0.13 installed and working with rlm_python. I am able
to send a RLM_MODULE_OK from within the authorize function.
In my sites-enabled I have
python {
module = example
python_path = ${modconfdir}/${.:name}
mod_authorize = ${.module}
func_authorize = authorize
}
I have installed sqlalchemy, a Python library and it is correctly
installed; as I can see from
$ python -c "import sqlalchemy; print sqlalchemy.__version__"
1.1.3
However when I try using it inside of my file being called from
rlm_python, I am getting
Python version: 2.7.12 (default, Jul 1 2016, 15:12:24) [GCC 5.4.0
20160609]
System exec is
python_function_load - Module 'example' not found
<type 'exceptions.ImportError'> (No module named sqlalchemy)
python_function_load - Failed to import python function 'example.authorize'
/usr/local/etc/raddb/mods-enabled/python[1]: Instantiation failed for
module "python"
Is the python binary being used by rlm_python different from the system
binary?
My radiusd version is
radiusd: FreeRADIUS Version 3.0.13 (git #7758e73),
--
Regards,
Azeem
More information about the Freeradius-Devel
mailing list