From e7ed4035b5bc7bf57d54f5b8dfd789af16671d4b Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Mon, 21 Feb 2011 10:25:52 -0500 Subject: [PATCH] Set krb5_realm in sssd.conf in the ipa provider. ticket 925 --- ipa-client/ipa-install/ipa-client-install | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install index 4b9bd29c6..9f4c685ef 100755 --- a/ipa-client/ipa-install/ipa-client-install +++ b/ipa-client/ipa-install/ipa-client-install @@ -477,7 +477,7 @@ def configure_certmonger(fstore, subject_base, cli_realm, options): except: print "certmonger request for host certificate failed" -def configure_sssd_conf(fstore, cli_domain, cli_server, options): +def configure_sssd_conf(fstore, cli_realm, cli_domain, cli_server, options): fstore.backup_file("/etc/sssd/sssd.conf") sssdconfig = SSSDConfig.SSSDConfig() sssdconfig.new_config() @@ -487,6 +487,8 @@ def configure_sssd_conf(fstore, cli_domain, cli_server, options): domain.set_option('ipa_server', '_srv_, %s' % cli_server) domain.set_option('ipa_domain', cli_domain) + if cli_domain.lower() != cli_realm.lower(): + domain.set_option('krb5_realm', cli_realm) # Might need this if /bin/hostname doesn't return a FQDN #domain.set_option('ipa_hostname', 'client.example.com') @@ -817,7 +819,7 @@ def main(): print "Created /etc/ipa/default.conf" if options.sssd: - if configure_sssd_conf(fstore, cli_domain, cli_server, options): + if configure_sssd_conf(fstore, cli_realm, cli_domain, cli_server, options): return 1 print "Configured /etc/sssd/sssd.conf" else: