We've got a FreeRADIUS 2 deamon installed on a CentOS 5.7 server.

We'd like to use a pre-written Python module to do authorization but there's a problem: The Python module we've got requires Python 2.6 or more but the Python that comes installed with CentOS is Python 2.4.

Now, the server admin have installed Python 2.6 in a separate folder /usr/lib/Python2.6 so we can run Python 2.6 from there. However, /usr/bin/python is still Python 2.4. Apparently, replacing the default Python 2.4 will cause all kinds of problems.

Is there any way I can force FreeRADIUS to use /usr/lib/Python2.6 instead of the default 2.4 to locate and run modules?

link|improve this question

25% accept rate
Can't the script be modified to run from a specific path? – Bart Silverstrim Jan 23 at 14:01
I think you try to export PATH variable in freeradius startup script. In the exported value, you can specify /usr/lib/ as first path and then append the default other paths like /bin and /usr/bin. You may need also to symlink python2.6 to python. – Khaled Jan 23 at 14:15
Symlinking Python won't work since that'll break stuff for CentOS. Specifying the path in the script, didn't try that. Will check. – henriksen Jan 23 at 17:49
feedback

2 Answers

Open up the init script (something like /etc/init.d/freeradius). You then need to locate the line where it's launching the application, and change any instance of 'python' to '/usr/lib/Python2.6'.

link|improve this answer
feedback

You should be able to call the 2.6 Python directly by listing the full path. So, if your script was called FreeRADIUS.py, your script would read /usr/lib/Python2.6/FreeRADIUS.py.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.