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_e... 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