Authenticate against PAM
Provides an authenticate function that will allow the caller to authenticate a user against the Pluggable Authentication Modules (PAM) on the system.
Implemented using ctypes, so no compilation is necessary.
There is one extra configuration option for pam. The pam_service that is authenticated against. This defaults to login
Solaris-like (SmartOS, OmniOS, ...) systems may need
auth.pam.service set to
PAM authentication will not work for the
The Python interface to PAM does not support authenticating as
Using PAM groups with SSSD groups on python2.
To use sssd with the PAM eauth module and groups the pysss module is needed. On RedHat/CentOS this is python-sss.
This should not be needed with python >= 3.3, because the os modules has the getgrouplist function.
Wrapper class for pam_conv structure
Wrapper class for pam_handle_t
Wrapper class for pam_message structure
Wrapper class for pam_response structure
auth(username, password, **kwargs)¶
Authenticate via pam
Returns True if the given username and password authenticate for the given service. Returns False otherwise
username: the username to authenticate
password: the password in plain text
groups(username, *args, **kwargs)¶
Retrieve groups for a given user for this auth provider
Uses system groups