diff options
| author | Simo Sorce <ssorce@redhat.com> | 2007-07-02 15:51:04 -0400 |
|---|---|---|
| committer | Simo Sorce <ssorce@redhat.com> | 2007-07-02 15:51:04 -0400 |
| commit | 89c85f06d9a428bb0590cba3ebf2b3830802931e (patch) | |
| tree | 3987c8ce8ebb7b8098cb415d9bf264c16f5cfc09 /ipa-install/src/ipa/krbinstance.py | |
| parent | 2d2471d9f2fb385dfb5ec16502cc48de8def345f (diff) | |
| download | freeipa.git-89c85f06d9a428bb0590cba3ebf2b3830802931e.tar.gz freeipa.git-89c85f06d9a428bb0590cba3ebf2b3830802931e.tar.xz freeipa.git-89c85f06d9a428bb0590cba3ebf2b3830802931e.zip | |
Manage to create a spcific DS user for the ldap instance
Add uncalled code to load and configure the password extop plugin
Diffstat (limited to 'ipa-install/src/ipa/krbinstance.py')
| -rw-r--r-- | ipa-install/src/ipa/krbinstance.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/ipa-install/src/ipa/krbinstance.py b/ipa-install/src/ipa/krbinstance.py index d93c0a04..498f0506 100644 --- a/ipa-install/src/ipa/krbinstance.py +++ b/ipa-install/src/ipa/krbinstance.py @@ -74,6 +74,7 @@ def run(args, stdin=None): class KrbInstance: def __init__(self): + self.ds_user = None self.realm_name = None self.host_name = None self.admin_password = None @@ -82,7 +83,8 @@ class KrbInstance: self.kdc_password = None self.sub_dict = None - def create_instance(self, realm_name, host_name, admin_password, master_password): + def create_instance(self, ds_user, realm_name, host_name, admin_password, master_password): + self.ds_user = ds_user self.realm_name = realm_name.upper() self.host_name = host_name self.admin_password = admin_password @@ -153,3 +155,15 @@ class KrbInstance: #populate the directory with the realm structure args = ["/usr/kerberos/sbin/kdb5_ldap_util", "-D", "uid=kdc,cn=kerberos,"+self.suffix, "-w", self.kdc_password, "create", "-s", "-r", self.realm_name, "-subtrees", self.suffix, "-sscope", "sub"] run(args) + + # TODO: NOT called yet, need to find out how to make sure the plugin is available first + def __add_pwd_extop_module(self): + #add the password extop module + extop_txt = template_file(SHARE_DIR + "ipapwd_extop_plugin.ldif", self.sub_dict) + extop_fd = write_tmp_file(extop_txt) + ldap_mod(extop_fd, "cn=Directory Manager", self.admin_password) + extop_fd.close() + + #add an ACL to let the DS user read the master key + args = ["/usr/bin/setfacl", "-m", "u:"+self.ds_user+":r", "/var/kerberos/krb5kdc/.k5."+self.realm_name] + run(args) |
