[web2py] Re: apache2/pam/pwauth to remove www-data from shadow group

2016-02-18 Thread kwebb
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

[web2py] Re: apache2/pam/pwauth to remove www-data from shadow group

2016-02-17 Thread kwebb
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