Jump to content
Калькуляторы

Помогите настроить rlm_python под freeradius 3.0.2

Приветствую , есть проблема с подключением питон модуля в третьей версии радиусс сервера, подскажите может не так чего делаю.

Настройка сервера в третьей версии немного изменилась , в mods-enabled создал симлинк на файл конфигурации в папке mods-avaible

сам файл выглядит так

#
# Make sure the PYTHONPATH environmental variable contains the
# directory(s) for the modules listed below.
#
# Uncomment any func_* which are included in your module. If
# rlm_python is called for a section which does not have
# a function defined, it will return NOOP.
#
python {
module = example

mod_instantiate = ${.module}
#	func_instantiate = instantiate

mod_detach = ${.module}
#	func_detach = instantiate

mod_authorize = ${.module}
#	func_authorize = authorize

mod_authenticate = ${.module}
#	func_authenticate = authenticate

mod_preacct = ${.module}
#	func_preacct = preacct

mod_accounting = ${.module}
#	func_accounting = accounting

mod_checksimul = ${.module}
#	func_checksimul = checksimul

mod_pre_proxy = ${.module}
#	func_pre_proxy = pre_proxy

mod_post_proxy = ${.module}
#	func_post_proxy = post_proxy

mod_post_auth = ${.module}
#	func_post_auth = post_auth

mod_recv_coa = ${.module}
#	func_recv_coa = recv_coa

mod_send_coa = ${.module}
#	func_send_coa = send_coa
}

указываю место где лежит скрипт module = "/etc/raddb/mods-config/python/example.py

" , затем в sites-enabled в стандартном конфиге в секции authorize пишу что нужно итспользовать модуль питона. Запускаю радиус с отладкой radiusd -Xf вижу что модуль подключился , посылаю тестовый ответ модуль возвращает [python]=noop, все вродебы хорошо, теперь пытаюсь раскоментировать функции func_instantiate = instantiate и вылетает ошибка что скрипт не найден и функция импортироваться не будет

 

rlm_python:mod_load_function: module 'example' is not found
rlm_python:EXCEPT:<type 'exceptions.ImportError'>: No module named example
rlm_python:mod_load_function: failed to import python function 'example.instantiate'
/etc/raddb/mods-enabled/python[9]: Instantiation failed for module "python"

 

на любой путь для питон скрипта module = example выдает что файл не найдет (( , подскажите как указать правильный путь к скрипту с функциями ?

Share this post


Link to post
Share on other sites

Да все верно ты прям мысли читаешь =) вот думаю на чем остановится на bsdradius или freeradius первый может не потянуть нагрузку.

А можно поинтересоваться а в чем была причина перехода с rlm_perl ?

Share this post


Link to post
Share on other sites

В 11.04.2014 в 12:38, pppoetest сказал:

Это, имхо, религиозный вопрос.

Извиняюсь есть успехи в биллинге на Python?

Share this post


Link to post
Share on other sites

Так же вопрос к знатокам, подскажите, пожалуйста, как установить Python на Termux? Пробовал, как советовали тут, но не получилось.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.