This is now an issue in Ubuntu 18.04 as well. I'm guessing whatever broke was backported into 18.04 as well.
See these scripts as examples:
Version for 18.04 and 20.04:
https://raw.githubusercontent.com/earnolmartin/EHCP-Force-Edition/master/ehcp/etc/pam/pam_dbauth_vsftpd_ubuntu_20_plus.py
Version for 16.04:
https://raw.githubusercontent.com/earnolmartin/EHCP-Force-Edition/master/ehcp/etc/pam/pam_dbauth_vsftpd.py
Difference is that in 18.04 and 20.04, I must set the path in the script:
sys.path.insert(0, '/usr/local/lib/python2.7/dist-packages') sys.path.insert(0, '/usr/lib/python2.7/dist-packages')
If I do not, I get this error:
Sep 26 19:10:41 host /etc/security/pam_dbauth_smtp.py[9965]: Traceback (most recent call last): Sep 26 19:10:41 host /etc/security/pam_dbauth_smtp.py[9965]: File "/etc/security/pam_dbauth_smtp.py", line 64, in <module> Sep 26 19:10:41 host /etc/security/pam_dbauth_smtp.py[9965]: from passlib.hash import mysql41 Sep 26 19:10:41 host /etc/security/pam_dbauth_smtp.py[9965]: ImportError: No module named passlib.hash Sep 26 19:10:41 host saslauthd[9965]: DEBUG: auth_pam: pam_authenticate failed: Error in service module
This is now an issue in Ubuntu 18.04 as well. I'm guessing whatever broke was backported into 18.04 as well.
See these scripts as examples:
Version for 18.04 and 20.04:
https:/ /raw.githubuser content. com/earnolmarti n/EHCP- Force-Edition/ master/ ehcp/etc/ pam/pam_ dbauth_ vsftpd_ ubuntu_ 20_plus. py
Version for 16.04:
https:/ /raw.githubuser content. com/earnolmarti n/EHCP- Force-Edition/ master/ ehcp/etc/ pam/pam_ dbauth_ vsftpd. py
Difference is that in 18.04 and 20.04, I must set the path in the script:
sys.path.insert(0, '/usr/local/ lib/python2. 7/dist- packages' ) python2. 7/dist- packages' )
sys.path.insert(0, '/usr/lib/
If I do not, I get this error:
Sep 26 19:10:41 host /etc/security/ pam_dbauth_ smtp.py[ 9965]: Traceback (most recent call last): pam_dbauth_ smtp.py[ 9965]: File "/etc/security/ pam_dbauth_ smtp.py" , line 64, in <module> pam_dbauth_ smtp.py[ 9965]: from passlib.hash import mysql41 pam_dbauth_ smtp.py[ 9965]: ImportError: No module named passlib.hash
Sep 26 19:10:41 host /etc/security/
Sep 26 19:10:41 host /etc/security/
Sep 26 19:10:41 host /etc/security/
Sep 26 19:10:41 host saslauthd[9965]: DEBUG: auth_pam: pam_authenticate failed: Error in service module