Enable SSSD on client install

authconfig component changed its behavior. It no longer starts and
enables SSSD daemon when --enablesssd and --enablesssdauth options
are used. It only enables the PAM module and adds SSSD to nsswitch.

Enable SSSD on new client/server installs manually. Also make sure
that we stop&disable SSSD when we delete the configuration.

https://fedorahosted.org/freeipa/ticket/3307
This commit is contained in:
Martin Kosek 2012-12-18 13:22:40 +01:00
parent 389854756b
commit b3ea7d2d62

View File

@ -454,6 +454,18 @@ def uninstall(options, env):
root_logger.info("Redundant SSSD configuration file " +
"/etc/sssd/sssd.conf was moved to /etc/sssd/sssd.conf.deleted")
sssd = ipaservices.service('sssd')
try:
sssd.stop()
except CalledProcessError:
root_logger.warning("SSSD service could not be stopped")
try:
sssd.disable()
except CalledProcessError, e:
root_logger.warning(
"Failed to disable automatic startup of the SSSD daemon: %s", e)
if fstore.has_files():
root_logger.info("Restoring client configuration files")
ipaservices.restore_network_configuration(fstore, statestore)
@ -1855,6 +1867,12 @@ def install(options, env, fstore, statestore):
except CalledProcessError:
root_logger.warning("SSSD service restart was unsuccessful.")
try:
sssd.enable()
except CalledProcessError, e:
root_logger.warning(
"Failed to enable automatic startup of the SSSD daemon: %s", e)
if not options.sssd:
#Modify pam to add pam_krb5 only when sssd is not in use
auth_config.reset()