def pam_auth():

    def pam_auth_aux(username, password):
        return authenticate(username, password)

    return pam_auth_aux
to use pam_login:
dataset/ETHPy150Open uwdata/termite-data-server/web2py/gluon/contrib/login_methods/pam_auth.py/pam_auth