Small changes

This commit is contained in:
nikolark committed 2011-11-22 01:25:18 +01:00
1 parent fdcb4f5d57
commit ed8ce61dbf
4 files changed
+7 -2

No files matched your search

+2 -1
View File
@@ -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()