summaryrefslogtreecommitdiffstats
path: root/ipa-client
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2012-09-12 07:31:15 -0400
committerRob Crittenden <rcritten@redhat.com>2012-09-11 15:41:56 -0400
commita649d2734a650f51d2a07744e5816e0fe513b489 (patch)
tree736beea0a89d509ec5d97b47226f39580c9379e1 /ipa-client
parent78e0e988c5dedee8229c1c43a76d6af6a35e036f (diff)
downloadfreeipa.git-a649d2734a650f51d2a07744e5816e0fe513b489.tar.gz
freeipa.git-a649d2734a650f51d2a07744e5816e0fe513b489.tar.xz
freeipa.git-a649d2734a650f51d2a07744e5816e0fe513b489.zip
Fix server installation
The fix to ticket #2982 removed a kinit call when the client was installed as part of a master. Re-add the kinit call in this case.
Diffstat (limited to 'ipa-client')
-rwxr-xr-xipa-client/ipa-install/ipa-client-install12
1 files changed, 10 insertions, 2 deletions
diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install
index 06e07983..392aa65a 100755
--- a/ipa-client/ipa-install/ipa-client-install
+++ b/ipa-client/ipa-install/ipa-client-install
@@ -1569,8 +1569,16 @@ def install(options, env, fstore, statestore):
root_logger.info("Failed to add CA to the default NSS database.")
return CLIENT_INSTALL_ERROR
- # If on master assume kerberos is already configured properly.
- if not options.on_master:
+ if options.on_master:
+ # If on master assume kerberos is already configured properly.
+ # Get the host TGT.
+ try:
+ run(['/usr/bin/kinit', '-k', '-t', '/etc/krb5.keytab',
+ 'host/%s@%s' % (hostname, cli_realm)], env=env)
+ except CalledProcessError, e:
+ root_logger.error("Failed to obtain host TGT.")
+ return CLIENT_INSTALL_ERROR
+ else:
# Configure krb5.conf
fstore.backup_file("/etc/krb5.conf")
if configure_krb5_conf(