/usr/share/pyshared/gluon/contrib/login_methods/pam_auth.py is in python-gluon 1.99.7-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | from gluon.contrib.pam import authenticate
def pam_auth():
"""
to use pam_login:
from gluon.contrib.login_methods.pam_auth import pam_auth
auth.settings.login_methods.append(pam_auth())
or
auth.settings.actions_disabled=[
'register','change_password','request_reset_password']
auth.settings.login_methods=[pam_auth()]
The latter method will not store the user password in auth_user.
"""
def pam_auth_aux(username, password):
return authenticate(username, password)
return pam_auth_aux
|