Ejemplo n.º 1
0
 def parse_ipa_version(version):
     return BaseTaskNamespace.parse_ipa_version(version)
Ejemplo n.º 2
0
 def modify_nsswitch_pam_stack(self, sssd, mkhomedir, statestore,
                               sudo=True, subid=False):
     # pylint: disable=ipa-forbidden-import
     from ipalib import sysrestore  # FixMe: break import cycle
     # pylint: enable=ipa-forbidden-import
     fstore = sysrestore.FileStore(paths.IPA_CLIENT_SYSRESTORE)
     logger.debug('Enabling SSSD in nsswitch')
     BaseTask.configure_nsswitch_database(self, fstore, 'group',
                                          ['sss'], default_value=['compat'])
     BaseTask.configure_nsswitch_database(self, fstore, 'passwd',
                                          ['sss'], default_value=['compat'])
     BaseTask.configure_nsswitch_database(self, fstore, 'shadow',
                                          ['sss'], default_value=['compat'])
     BaseTask.configure_nsswitch_database(self, fstore, 'netgroup',
                                          ['files','sss'], preserve=False,
                                          default_value=['files','nis'])
     BaseTask.configure_nsswitch_database(self, fstore, 'automount',
                                          ['files','sss'], preserve=False,
                                          default_value=['files','nis'])
     if sudo:
         BaseTask.enable_sssd_sudo(self,fstore)
     logger.debug('Enabling sss in PAM')
     try:
         ipautil.run([paths.PAM_CONFIG, '--add', '--sss'])
         if mkhomedir:
             logger.debug('Enabling mkhomedir in PAM')
             try:
                 ipautil.run([paths.PAM_CONFIG, '--add', '--mkhomedir',
                              '--mkhomedir-umask=0077'])
             except ipautil.CalledProcessError:
                 logger.debug('Failed to configure PAM mkhomedir')
                 return False
     except ipautil.CalledProcessError:
         logger.debug('Failed to configure PAM to use SSSD')
         return False
     return True
Ejemplo n.º 3
0
 def parse_ipa_version(version):
     return BaseTaskNamespace.parse_ipa_version(version)
Ejemplo n.º 4
0
 def disable_ldap_automount(self, statestore):
     # SUSE does not use authconfig or authselect
     return BaseTask.disable_ldap_automount(self, statestore)
Ejemplo n.º 5
0
 def disable_ldap_automount(self, statestore):
     return BaseTaskNamespace.disable_ldap_automount(self, statestore)