Archived
Small changes
This commit is contained in:
1 parent
fdcb4f5d57
commit
ed8ce61dbf
4 files changed
+7
-2
No files matched your search
@@ -21,6 +21,8 @@ class LDAPSetPasswordForm(SetPasswordForm):
|
||||
if commit:
|
||||
self.user.save()
|
||||
|
||||
# TODO: Log the result of the above.
|
||||
|
||||
return self.user
|
||||
|
||||
def clean_new_password1(self):
|
||||
|
||||
@@ -180,4 +180,3 @@ class Radusergroup(models.Model):
|
||||
class Meta:
|
||||
db_table = u'radusergroup'
|
||||
|
||||
|
||||
+2
-1
@@ -4,9 +4,10 @@ from django.core.exceptions import ObjectDoesNotExist
|
||||
|
||||
from models import Radcheck
|
||||
import passwd
|
||||
import settings
|
||||
|
||||
def set_kerberos_password(username, raw_password):
|
||||
principal = u"{0}@NEUF.NO".format(username)
|
||||
principal = u"{0}@{1}".format(username, settings.KERBEROS_REALM)
|
||||
kadmin_query = u"-q change_password {0} -pw {1}".format(principal, raw_password)
|
||||
p = Popen(['kadmin', kadmin_query], stdout=PIPE)
|
||||
output, error = p.communicate()
|
||||
|
||||
@@ -162,3 +162,6 @@ import logging
|
||||
logger = logging.getLogger('django_auth_ldap')
|
||||
logger.addHandler(logging.StreamHandler())
|
||||
logger.setLevel(logging.DEBUG)
|
||||
|
||||
# Kerberos realm
|
||||
KERBEROS_REALM = "NEUF.NO"
|
||||
Reference in new issue
Block a user