I finally resolved this. Turns out PAM is not actually calling pwauth. A
simple bit of code:
proc = subprocess.Popen('/usr/sbin/pwauth', stdin=subprocess.PIPE)
proc.communicate('%s\n%s\n'%(username, password))
return proc.returncode == 0
Does the trick. I will formaliz
Digging into this more, I have learned that the pam calls in the pam.py
module use the username than is trying to authenticate and pwauth requires
the www-data userid. There is some other magic with
apache2/mod-authnz-external
that makes this work with htaccess. I tried adding a
pam_set_item
2 matches
Mail list logo