From 614a75cd7999a0f8b7e13044b90f4f4dfe6220dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Agah=20=C3=96z?= Date: Mon, 15 Jun 2020 08:54:27 +0300 Subject: [PATCH] sssd switch --- .../registration/execute_sssd_authentication.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/base/registration/execute_sssd_authentication.py b/src/base/registration/execute_sssd_authentication.py index 178b01b..da69e2b 100644 --- a/src/base/registration/execute_sssd_authentication.py +++ b/src/base/registration/execute_sssd_authentication.py @@ -58,6 +58,16 @@ class ExecuteSSSDAuthentication: # Install libpam-sss sssd-common for sssd authentication (result_code, p_out, p_err) = self.util.execute("sudo apt install libpam-sss sssd-common -y") + + + + (result_code, p_out, p_err) = self.util.execute("chmod 600 {}".format(sssd_config_file_path)) + if (result_code == 0): + self.logger.info("Chmod komutu başarılı bir şekilde çalıştırıldı") + else: + self.logger.error("Chmod komutu başarısız : " + str(p_err)) + + if result_code != 0: self.logger.error("SSSD packages couldn't be downloaded.") return False @@ -66,8 +76,8 @@ class ExecuteSSSDAuthentication: file_common_session = open(common_session_conf_path, 'r') file_data = file_common_session.read() - if "session optional pam_mkhomedir.so skel=/etc/skel umask=077" not in file_data : - file_data = file_data + "\n" + "session optional pam_mkhomedir.so skel=/etc/skel umask=077" + if "session optional pam_mkhomedir.so skel=/etc/skel umask=077" not in file_data : + file_data = file_data + "\n" + "session optional pam_mkhomedir.so skel=/etc/skel umask=077" self.logger.info("common-session is configured") file_common_session.close()