How do I get every userid passed to an rlm_python module

Herwin Weststrate herwin at quarantainenet.nl
Wed Feb 10 10:06:27 CET 2016


On 10-02-16 02:53, Matthew Newton wrote:

> As for how to actually change attributes in python, I've never
> done it I'm afraid. From one of the example files it looks like
> you might want something like
> 
>  return (radiusd.RLM_MODULE_UPDATED, (), (('Auth-Type', 'Accept'),))
> 
> at the end of your authorize function. To return the correct
> password you could try
> 
>  return (radiusd.RLM_MODULE_UPDATED, (), (('Cleartext-Password', 'thingy'),))

I recently updated the wiki page for rlm_python,
http://wiki.freeradius.org/modules/Rlm_python#python-module-for-freeradius_example_writing-the-code
actually contains an example of returning a Cleartext-Password.

> I wouldn't put python in authorize unless you really know what
> you're doing.

I agree to this. Python has to fetch the passwords somehow, it's very
likely that there is an existing module for FreeRADIUS that can do that
out of the box.

-- 
Herwin Weststrate



More information about the Freeradius-Users mailing list