SURFscz / pam-websso-python

WebSSO PAM Module
GNU General Public License v3.0
16 stars 2 forks source link

Peculiar issue | ImportError: No module named OpenSSL #2

Open tgentry1986 opened 3 years ago

tgentry1986 commented 3 years ago

Hi There,

I have 2 ubuntu servers up and running with pam-websso - one 'websso' and one 'ssh' server.

All dependencies are installed, but when i try to ssh to the 'ssh' server, i get this in /var/log/auth.log;

Mar 31 21:52:27 ip-10-2-144-144 /opt/pam-websso/pam_websso.py[32616]: Traceback (most recent call last): Mar 31 21:52:27 ip-10-2-144-144 /opt/pam-websso/pam_websso.py[32616]: File "/opt/pam-websso/pam_websso.py", line 7, in Mar 31 21:52:27 ip-10-2-144-144 /opt/pam-websso/pam_websso.py[32616]: from OpenSSL import SSL Mar 31 21:52:27 ip-10-2-144-144 /opt/pam-websso/pam_websso.py[32616]: ImportError: No module named OpenSSL

which is really weird, because OpenSSL is installed for both python2 and python3, and works fine if i start a python shell for either version.

Any thoughts as to why it would fail to import the module when running /opt/pam-websso/pam_websso.py from the settings in /etc/pam.d/sshd ?

Ive tried my best to figure it out myself but haven't come up with any conclusive answers!

Thank very much

mrvanes commented 3 years ago

Well, it's been a while since I last looked at this code and we don't actively use it at the moment. The only thing I can say is: the setup requires pyOpenSSL (see setup.py) and should be installed system-wide, because python-pam can not start a virtualenv. What happens if you start a plain python3 shell and type from OpenSSL import SSL?