Hi All,
I’m going slightly barmy trying to figure this out, having been round several Python fora and elsewhere. I am discussing this with the vendors, but I thought I’d try here and have another sting to my bow.
I have a Ruckus Wireless system, and one of the means of providing access to it is to run a web-based portal provided by Ruckus that interfaces with the controller, and delivers a dynamic PSK to each user (each user gets a different PSK for our SSID) based on credentials the user supplies.
These comprise a handful of html pages and three python scripts. Simples.
Because our University provides Single Sign-On via the Shibboleth system, I figured I could drop the Ruckus portal software in a Shibboleth-protected directory on the web server, and pass the username and password to the wireless controller. I’ve configured the wireless controller to talk to a Radius server in our local network, which will just answer “YES” to valid usernames sent to it. Basically, a User will authenticate to Unversity SSO via Shibboleth, be passed to the local Wifi portal, which will send the username and a password to the Radius server via the wifi controller. If the username exists locally (in our AD) then the user is granted access to the wifi.
The problem is that although a user can successfully authenticate to SSO via Shibboleth, the python scripts totally fail - even when providing a username and password manually (I haven’t got round to feeding them data from the shibboleth session yet).
The supremely irritating thing is that in my lengthy discussions with Ruckus (gong on since November) they’ve got it to work on their Linux test boxes, but they’re using CentOS 6.
I’m having to use something I can install Shibboleth on and which runs Python 2.7 - so that means OpenSuse 12.3 or Centos 6. I’m testing Centos build today, but it is somewhat different (understatement) to the installations I’m used to (SLES 11 and OpenSuse12/13). I can’t test it with 13.1 as Shibboleth does not work on that system yet - the Apache module fails to load as there are dependencies that can’t be provided.
The error is as follows:
MOD_PYTHON ERROR
ProcessId: 15322
Interpreter: ‘gatekeeper.new.ox.ac.uk’
ServerName: ‘gatekeeper.new.ox.ac.uk’
DocumentRoot: ‘/srv/www/htdocs’
URI: ‘/cgi-bin/hotspot_login.py’
Location: None
Directory: ‘/srv/www/cgi-bin/’
Filename: ‘/srv/www/cgi-bin/hotspot_login.py’
PathInfo: ‘’
Phase: ‘PythonHandler’
Handler: ‘mod_python.cgihandler’
Traceback (most recent call last):
File “/usr/lib64/python2.7/site-packages/mod_python/importer.py”, line 1537, in HandlerDispatch
default=default_handler, arg=req, silent=hlist.silent)
File “/usr/lib64/python2.7/site-packages/mod_python/importer.py”, line 1229, in _process_target
result = _execute_target(config, req, object, arg)
File “/usr/lib64/python2.7/site-packages/mod_python/importer.py”, line 1128, in _execute_target
result = object(arg)
File “/usr/lib64/python2.7/site-packages/mod_python/cgihandler.py”, line 96, in handler
imp.load_module(module_name, fd, path, desc)
File “/srv/www/cgi-bin/hotspot_login.py”, line 22, in <module>
import xmlcommon
ImportError: No module named xmlcommon
xmlcommon.py DOES exist in the same directory as hotspot_login.py (the python script that kicks the process off), and has the same permissions.
If I start the Python interpreter from the command line, I can import that module - but it fails to do so when called from another python script in the same directory.
Any pointers? I’m all out of ideas here.
Cheers,
James