From de361cf2e25535b3967d6c67dd371f6723d4aa66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tuncay=20=C3=87OLAK?= Date: Tue, 11 Jun 2019 14:32:05 +0300 Subject: [PATCH] sssd configuraton for ldap login --- src/ahenkd.py | 4 ++-- src/base/registration/execute_sssd_authentication.py | 2 +- src/base/registration/registration.py | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ahenkd.py b/src/ahenkd.py index 0e4e633..5d614c3 100644 --- a/src/ahenkd.py +++ b/src/ahenkd.py @@ -159,7 +159,7 @@ class AhenkDaemon(BaseDaemon): # self.registration_failed() if registration.is_registered() is False: - print("Registation attemp") + print("Registration attemp") max_attempt_number -= 1 self.logger.debug('Ahenk is not registered. Attempting for registration') registration.registration_request(self.register_hostname,self.register_user_name,self.register_user_password) @@ -260,7 +260,7 @@ class AhenkDaemon(BaseDaemon): conf_manager.set('MACHINE', 'user_disabled', '1') with open('/etc/ahenk/ahenk.conf', 'w') as configfile: - self.logger.info('oepning config file ') + self.logger.info('opening config file ') conf_manager.write(configfile) user_disabled = conf_manager.get("MACHINE", "user_disabled") diff --git a/src/base/registration/execute_sssd_authentication.py b/src/base/registration/execute_sssd_authentication.py index 1c027a5..b55bcd7 100644 --- a/src/base/registration/execute_sssd_authentication.py +++ b/src/base/registration/execute_sssd_authentication.py @@ -156,7 +156,7 @@ class ExecuteSSSDAuthentication: self.logger.info("lightdm.conf has been configured.") self.util.execute("systemctl restart nscd.service") - self.util.execute("pam-auth-update --force") + # self.util.execute("pam-auth-update --force") self.logger.info("LDAP Login operation has been completed.") self.logger.info("LDAP Login işlemi başarı ile sağlandı.") diff --git a/src/base/registration/registration.py b/src/base/registration/registration.py index 076eab7..b033b7c 100644 --- a/src/base/registration/registration.py +++ b/src/base/registration/registration.py @@ -128,9 +128,9 @@ class Registration: #admin_password = self.user_password # same user get from server admin_password = self.db_service.select_one_result('registration', 'password', ' registered=1') if server_address != '' and dn != '' and version != '' and admin_dn != '' and admin_password != '': - self.logger.info("PAM LDAP configuration process starting....") - self.ldap_login.login(server_address,dn,version,admin_dn,admin_password) - self.logger.info("PAM LDAP configuration process starting....") + self.logger.info("SSSD configuration process starting....") + self.ldap_login.authenticate(server_address, dn, admin_dn, admin_password) + self.logger.info("SSSD configuration process starting....") else : raise Exception( 'LDAP Ayarları yapılırken hata oluştu. Lütfen ağ bağlantınızı kontrol ediniz. Deponuzun güncel olduğundan emin olunuz.')