<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def check_password(self, username, password):
 """The actual password checking logic. Separated from the authenticate code from Django for easier updating"""

        try:
            if SUPPORTS_VERIFY:
                kerberos.checkPassword(username.lower(), password, getattr(settings, "KRB5_SERVICE", ""), getattr(settings, "KRB5_REALM", ""), getattr(settings, "KRB5_VERIFY_KDC", True))
            else:
                kerberos.checkPassword(username.lower(), password, getattr(settings, "KRB5_SERVICE", ""), getattr(settings, "KRB5_REALM", ""))
            return True
        except kerberos.BasicAuthError:
            if getattr(settings, "KRB5_DEBUG", False):
                logger.exception("Failure during authentication")
            return False
        except:
            if getattr(settings, "KRB5_DEBUG", False):
                logger.exception("Failure during authentication")
            # for all other execptions also deny access
            return False