def pamWithUsernameAndPassword(username, password, service='login'):
    """
        Check username and password using PAM.

        Returns True if credentials are accepted, False otherwise.
        """
