Freeradius 2.04 + python + mysqldb python module on Debian 4.0

Mike O'Connor freeradius at pineview.net
Wed May 21 03:36:28 CEST 2008


Hi Jester

A few things.

1. I've never been able to get python to work correct on a debian 
system, this is for both Sarge and Etch. We currently have to use Centos 
5 for our proxy radius systems which use python.

2. I do not believe that loading a mysql connection each time you 
recived a radius packet is going to be a good idea. I would instead 
create a very small shim which calls a python daemon via a unix socket.

Cheers
Mike

jpurtteman at columbus.rr.com wrote:
> >From the subject, you can probably guess that its just barely a Freeradius problem :)  Anyway...
>
> Using the Build (http://wiki.freeradius.org/Build) instructions for Debian, i have compiled FreeRADIUS with python support.  I copied the example module configuration for python out of experimental.conf.  using the provided test script, the server runs fine. and any other simple script works until i try to import MySQLdb for python.  However, when you try to  "import MySQLdb",  it blows it stops, and throws the following:
>
> <type 'exceptions.ImportError'>: /var/lib/python-support/python2.5/_mysql.so: undefined symbol: PyExc_ImportError 
> Failed to import python module "pyrad_auth" 
> /etc/freeradius/radiusd.conf[608]: Instantiation failed for module "python"
> Errors initializing modules
>
> Which, i think, means that it can't load the mysql module for some reason, and i don't know much else.  from the command prompt, i can execute the .py script that i am using.  In fact, it is the same script that works on a SuSE 10.1 server that i have, so i think the script is not likely to be the problem.
>
> Any pointers/hints/need more info?  Much appreciated.
>
> --Jester Purtteman
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
>   




More information about the Freeradius-Users mailing list