rlm_python and post-auth manipulation.
phil lemelin
phil.lemelin at gmail.com
Wed Oct 21 18:51:33 CEST 2009
Good day Freeradius users,
I am trying to use the rlm_python module to do additional actions after an
user has been authenticated. To learn, I'm using the radiusd_test.py which
is in the python path. I haven't found an indication that says it is
impossible to do, correct me if I'm wrong off-course.
I did the following ( by the way, i made sure rlm_python was compiled with
the server ) :
Created a python module under "modules" :
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
> }
>
Added "python" in the site-enabled/default "post-auth" section
Now, in the radiusd -X log, I can see the following :
Module: Instantiating python
> python_init done
> python {
> mod_instantiate = "radiusd_test"
> func_instantiate = "instantiate"
> mod_authorize = "radiusd_test"
> func_authorize = "authorize"
> mod_accounting = "radiusd_test"
> func_accounting = "accounting"
> mod_detach = "radiusd_test"
> func_detach = "detach"
> }
> *** instantiate ***
>
*Ok, i'm missing the postauth, why ?* The radiusd_test.py file has a
postauth function which I think should be linked by my python modules
declaration.
Finnaly, in the log, I have the following :
/usr/local/etc/raddb/sites-enabled/default[422]: "python" modules aren't
> allowed in 'post-auth' sections -- they have no such method.
> /usr/local/etc/raddb/sites-enabled/default[380]: Errors parsing post-auth
> section.
>
Is this caused because I can't use python modules in post-auth sections, or
I can't use THAT python module because it is missing the post-auth method ?
Feel free to point me in the right documentation section that I MUST have
missed.
--
Philippe-Alexandre Lemelin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20091021/97734129/attachment.html>
More information about the Freeradius-Users
mailing list