Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

500 Internal Server Error - No Module Named 'onetimepass' #12

Open
kevin-webster opened this issue Jul 3, 2019 · 3 comments
Open

500 Internal Server Error - No Module Named 'onetimepass' #12

kevin-webster opened this issue Jul 3, 2019 · 3 comments

Comments

@kevin-webster
Copy link

kevin-webster commented Jul 3, 2019

Hi,

I've followed the instructions in the readme file to the letter, for a test domain.

When I attempt to authenticate, the redirect URL changes to the following:

http://test/auth/auth?/%3f

When I look at the Apache error logs, I can see the following:

End of script output before headers: auth.

I noticed someone else reported this previously so I attempted to run the ./auth script directly yet this comes up with the following:

No module named 'onetimepass'

This module was previously installed using sudo pip install onetimepass, yet when I attempt to install it again, I see the following message:

sudo pip install onetimepass
The directory '/home/<user>/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/<user>/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: onetimepass in /usr/local/lib/python2.7/dist-packages
Requirement already satisfied: six in /usr/lib/python2.7/dist-packages (from onetimepass)

Any clues would be greatly appreciated.

@kevin-webster
Copy link
Author

Ok, so what I should have done is use pip3 and not pip.

Having moved past that issue, I now have another one whereby after entering the credentials (new ones generated using the htdigest command), I get the following message on the browser:

Contact your administrator to obtain your 2FA secret.

And nothing else happens...

@kevin-webster
Copy link
Author

Doh! This issue can now be ignored - sorry. There was an error in the tokens.json file.

I've since managed to generate a base32 secret token, store it in the tokens.json file for a new user, download the Google Authenticator app and successfully log in!

Apologies for my foolishness!

@bcnx
Copy link

bcnx commented Dec 25, 2020

I can confirm that things start working when using pip3 in stead of pip. This makes sense as the shebang of the auth file points to python3.
Can the documentation be changed to reflect this? It will save a lot of people from running into the same issue.

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

No branches or pull requests

2 participants