rlm_python , did not obey python_path in config

425 Views Asked by At

I try to play with FreeRadius rlm_python FreeRadius Version is : 3.0.15

first I put 'python_path=${modconfdir}/${.:name}' in /etc/freeradius/mods-available/python

run in debug mode. part of the debug msg shown :

Wed Sep 13 18:12:31 2017 : Debug: Loaded rlm_python, checking if it's valid
Wed Sep 13 18:12:31 2017 : Debug:   # Loaded module rlm_python
Wed Sep 13 18:12:31 2017 : Debug:   # Loading module "python" from file /etc/freeradius/mods-enabled/python
Wed Sep 13 18:12:31 2017 : Debug:   python {
Wed Sep 13 18:12:31 2017 : Debug:       mod_instantiate = "example"
Wed Sep 13 18:12:31 2017 : Debug:       mod_authorize = "example"
Wed Sep 13 18:12:31 2017 : Debug:       func_authorize = "authorize"
Wed Sep 13 18:12:31 2017 : Debug:       mod_authenticate = "example"
Wed Sep 13 18:12:31 2017 : Debug:       mod_preacct = "example"
Wed Sep 13 18:12:31 2017 : Debug:       mod_accounting = "example"
Wed Sep 13 18:12:31 2017 : Debug:       func_accounting = "accounting"
Wed Sep 13 18:12:31 2017 : Debug:       mod_checksimul = "example"
Wed Sep 13 18:12:31 2017 : Debug:       mod_pre_proxy = "example"
Wed Sep 13 18:12:31 2017 : Debug:       mod_post_proxy = "example"
Wed Sep 13 18:12:31 2017 : Debug:       mod_post_auth = "example"
Wed Sep 13 18:12:31 2017 : Debug:       mod_recv_coa = "example"
Wed Sep 13 18:12:31 2017 : Debug:       mod_send_coa = "example"
Wed Sep 13 18:12:31 2017 : Debug:       mod_detach = "example"
Wed Sep 13 18:12:31 2017 : Debug:       python_path = "/etc/freeradius/mods-config/python"
Wed Sep 13 18:12:31 2017 : Debug:       cext_compat = yes
Wed Sep 13 18:12:31 2017 : Debug:   }
 ...
Wed Sep 13 18:12:31 2017 : Debug:   # Instantiating module "python" from file /etc/freeradius/mods-enabled/python
Wed Sep 13 18:12:31 2017 : Info: Python version: 2.7.9 (default, Jun 29 2016, 13:11:10)  [GCC 4.9.2]
Segmentation fault

next I try to commented the python_path line, and from shell i put :

export PYTHONPATH=/etc/freeradius/mods-config/python

re try in debug mode , looks like running well

part of debug msg :

Wed Sep 13 18:20:03 2017 : Debug:   # Loading module "python" from file /etc/freeradius/mods-enabled/python
Wed Sep 13 18:20:03 2017 : Debug:   python {
Wed Sep 13 18:20:03 2017 : Debug:       mod_instantiate = "example"
Wed Sep 13 18:20:03 2017 : Debug:       mod_authorize = "example"
Wed Sep 13 18:20:03 2017 : Debug:       func_authorize = "authorize"
Wed Sep 13 18:20:03 2017 : Debug:       mod_authenticate = "example"
Wed Sep 13 18:20:03 2017 : Debug:       mod_preacct = "example"
Wed Sep 13 18:20:03 2017 : Debug:       mod_accounting = "example"
Wed Sep 13 18:20:03 2017 : Debug:       func_accounting = "accounting"
Wed Sep 13 18:20:03 2017 : Debug:       mod_checksimul = "example"
Wed Sep 13 18:20:03 2017 : Debug:       mod_pre_proxy = "example"
Wed Sep 13 18:20:03 2017 : Debug:       mod_post_proxy = "example"
Wed Sep 13 18:20:03 2017 : Debug:       mod_post_auth = "example"
Wed Sep 13 18:20:03 2017 : Debug:       mod_recv_coa = "example"
Wed Sep 13 18:20:03 2017 : Debug:       mod_send_coa = "example"
Wed Sep 13 18:20:03 2017 : Debug:       mod_detach = "example"
Wed Sep 13 18:20:03 2017 : Debug:       cext_compat = yes
Wed Sep 13 18:20:03 2017 : Debug:   }

I try to add the same export line to freeradius init script, but it didn't take effect.

So how to properly set python_path ?

Sincerely

-bino-

0

There are 0 best solutions below