diff --git a/intranet/apps/auth/backends.py b/intranet/apps/auth/backends.py
index <HASH>..<HASH> 100644
--- a/intranet/apps/auth/backends.py
+++ b/intranet/apps/auth/backends.py
@@ -62,7 +62,8 @@ class KerberosAuthenticationBackend(object):
             return True
         else:
             logger.debug("Kerberos failed to authorize {}".format(username))
-            del os.environ["KRB5CCNAME"]
+            if "KRB5CCNAME" in os.environ:
+                del os.environ["KRB5CCNAME"]
             return False
 
     def authenticate(self, username=None, password=None):
Check for env var before deleting it