Skip to content
This repository has been archived by the owner on May 20, 2022. It is now read-only.

Peculiar issue | ImportError: No module named OpenSSL #2

Open
tgentry1986 opened this issue Apr 2, 2021 · 1 comment
Open

Peculiar issue | ImportError: No module named OpenSSL #2

tgentry1986 opened this issue Apr 2, 2021 · 1 comment

Comments

@tgentry1986
Copy link

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
Copy link
Collaborator

mrvanes commented Apr 2, 2021

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants