Add the SSH service to SSSD config file before trying to activate it.

ticket 3069
This commit is contained in:
Jan Cholasta 2012-09-11 04:43:57 -04:00 committed by Martin Kosek
parent 2225730e99
commit 8728d3145f

View File

@ -803,14 +803,18 @@ def configure_sssd_conf(fstore, cli_realm, cli_domain, cli_server, options, clie
domain = sssdconfig.new_domain(cli_domain)
try:
sssdconfig.activate_service('ssh')
except SSSDConfig.NoServiceError:
sssdconfig.new_service('ssh')
except SSSDConfig.ServiceAlreadyExists:
pass
except SSSDConfig.ServiceNotRecognizedError:
root_logger.error("Unable to activate the SSH service in SSSD config.")
root_logger.info(
"Please make sure you have SSSD built with SSH support installed.")
root_logger.info(
"Configure SSH support manually in /etc/sssd/sssd.conf.")
sssdconfig.activate_service('ssh')
domain.add_provider('ipa', 'id')
#add discovery domain if client domain different from server domain