apple / ccs-pykerberos

Python Kerberos library used by CalendarServer
https://www.calendarserver.org
Apache License 2.0
117 stars 65 forks source link

checkPassword gives Permission Denied Error #69

Open nidhirbstpl opened 6 years ago

nidhirbstpl commented 6 years ago

I'm getting a permission denied error when trying to authenticate a user, the djano_auth_kerberos package that I've used makes use of the kerberos package. The authentication breaks at checkPassword. Any ideas why this issue might be coming?

from django.conf import settings from django_auth_kerberos.backends import KrbBackend kerb = KrbBackend() result = kerb.authenticate(settings.KRB5_TEST_USER,settings.KRB5_TEST_PASSWORD) Failure during authentication Traceback (most recent call last): File "/var/www/adlm_python/venv/lib/python3.4/site-packages/django_auth_kerberos/backends.py", line 60, in check_password kerberos.checkPassword(username.lower(), password, getattr(settings, "KRB5_SERVICE", ""), getattr(settings, "KRB5_REALM", ""), getattr(settings, "KRB5_VERIFY_KDC", True)) kerberos.BasicAuthError: ('Permission denied', 13)

Here is my settings.py file:

INSTALLED_APPS= [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'users', 'project', 'rest_framework', 'rest_framework.authtoken', 'corsheaders', 'kronos', 'django_auth_kerberos', ] KRB5_REALM = "AURITASAPP.COM" KRB5_SERVICE = 'feroze@AURITASAPP.COM' KRB5_DEBUG = True KRB5_VERIFY_KDC = True KRB5_USERNAME_MATCH_IEXACT = True LOGIN_REDIRECT_URL = '/' AUTHENTICATION_BACKENDS = ( 'django_auth_kerberos.backends.KrbBackend', ) KRB5_TEST_USER = 'feroze' KRB5_TEST_PASSWORD = '***'`