export kpasswd keytab during installation process

This commit is contained in:
Simo Sorce 2007-08-09 16:55:23 -04:00
parent d60f233223
commit 5a7c853ec7

View File

@ -89,6 +89,8 @@ class KrbInstance:
self.__set_kadmin_changepw_preauth()
self.__export_kadmin_changepw_keytab()
self.__create_sample_bind_zone()
self.start()
@ -191,6 +193,14 @@ class KrbInstance:
kread.close()
kerr.close()
def __export_kadmin_changepw_keytab(self):
(kwrite, kread, kerr) = os.popen3("/usr/kerberos/sbin/kadmin.local")
kwrite.write("ktadd -k /var/kerberos/krb5kdc/kpasswd.keytab kadmin/changepw\n")
kwrite.flush()
kwrite.close()
kread.close()
kerr.close()
def __create_http_keytab(self):
(kwrite, kread, kerr) = os.popen3("/usr/kerberos/sbin/kadmin.local")
kwrite.write("addprinc -randkey HTTP/"+self.fqdn+"@"+self.realm+"\n")