Author Topic: I can't login via FTP & ImportError: No module named passlib.hash  (Read 76 times)

spicer

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
    • ltspiceusers.ch
During the installation appears:

Code: [Select]
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (2.25.1)
Requirement already satisfied: chardet in /usr/lib/python3/dist-packages (4.0.0)
Collecting hashlib
  Using cached hashlib-20081119.zip (42 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-yu10gzky/hashlib_bebca6200e3a4f668e442af52a70740d/setup.py'"'"'; __file__='"'"'/tmp/pip-install-yu10gzky/hashlib_bebca6200e3a4f668e442af52a70740d/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-3rf8e70u
         cwd: /tmp/pip-install-yu10gzky/hashlib_bebca6200e3a4f668e442af52a70740d/
    Complete output (6 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-yu10gzky/hashlib_bebca6200e3a4f668e442af52a70740d/setup.py", line 68
        print "unknown OS, please update setup.py"
              ^
    SyntaxError: Missing parentheses in call to 'print'. Did you mean print("unknown OS, please update setup.py")?
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/74/bb/9003d081345e9f0451884146e9ea2cff6e4cc4deac9ffd4a9ee98b318a49/hashlib-20081119.zip#sha256=419de2fd10ae71ed9c6adcb55903f116abd1d8acc8c814dfd5f839b4d5013e38 (from https://pypi.org/simple/hashlib/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement hashlib
ERROR: No matching distribution found for hashlib

I can't login via FTP. "530 Login incorrect."

The auth.log shows:
Code: [Select]
Oct 14 00:32:43 xenforo /etc/security/pam_dbauth_vsftpd.py[5819]: Traceback (most recent call last):
Oct 14 00:32:43 xenforo /etc/security/pam_dbauth_vsftpd.py[5819]:   File "/etc/security/pam_dbauth_vsftpd.py", line 68, in <module>
Oct 14 00:32:43 xenforo /etc/security/pam_dbauth_vsftpd.py[5819]:     from passlib.hash import mysql41
Oct 14 00:32:43 xenforo /etc/security/pam_dbauth_vsftpd.py[5819]: ImportError: No module named passlib.hash

I think the problem is since the upgrade from Debian 10 to 11.
Why is EHCP still installing Python2.7? My OS is Debian 11 (Bullseye). There is no Python2.7 by default.
« Last Edit: October 22, 2022, 10:37:52 pm by spicer »
Wenn es mehrere Möglichkeiten gibt, eine Aufgabe zu erledigen, und eine davon in einer Katastrophe endet oder sonstwie unerwünschte Konsequenzen nach sich zieht, dann wird es jemand genau so machen. Alles, was schiefgehen kann, wird auch schiefgehen.
(Murphys Gesetz)

earnolmartin

  • Administrator
  • Sr. Member
  • *****
  • Posts: 279
    • View Profile
Re: I can't login via FTP & ImportError: No module named passlib.hash
« Reply #1 on: October 24, 2022, 12:13:29 pm »
Python 2 is required due to several modules using Python 2, and the default system wide python binary must be version 2.x for EHCP to work properly.   I believe a fresh install on Debian 11 will fix this issue, as it will install Python 2 as needed.
« Last Edit: October 24, 2022, 12:17:04 pm by earnolmartin »

earnolmartin

  • Administrator
  • Sr. Member
  • *****
  • Posts: 279
    • View Profile
Re: I can't login via FTP & ImportError: No module named passlib.hash
« Reply #2 on: October 24, 2022, 03:55:46 pm »
The new release that I'm making shortly will hopefully address some of these issues.

I found some problems via testing just now, so thanks for letting me know.  However, for now, Python 2 is still needed.

spicer

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
    • ltspiceusers.ch
Re: I can't login via FTP & ImportError: No module named passlib.hash
« Reply #3 on: October 25, 2022, 08:18:46 am »
THX  8)
Wenn es mehrere Möglichkeiten gibt, eine Aufgabe zu erledigen, und eine davon in einer Katastrophe endet oder sonstwie unerwünschte Konsequenzen nach sich zieht, dann wird es jemand genau so machen. Alles, was schiefgehen kann, wird auch schiefgehen.
(Murphys Gesetz)