From 4e2a2fe47a280a0ff9bdbf4507c1c8f9de57706e Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Thu, 8 Sep 2022 17:48:45 +0200 Subject: [PATCH] Bugfixing --- lib/pp_admintools/app/ldap.py | 2 +- lib/pp_admintools/app/remove_ldap_user.py | 8 +++++--- locale/de_DE/LC_MESSAGES/pp_admintools.po | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/pp_admintools/app/ldap.py b/lib/pp_admintools/app/ldap.py index 9142a40..12d5fb0 100644 --- a/lib/pp_admintools/app/ldap.py +++ b/lib/pp_admintools/app/ldap.py @@ -50,7 +50,7 @@ from ..config.ldap import LdapConnectionInfo, LdapConfiguration # rom ..config.ldap import DEFAULT_PORT_LDAP, DEFAULT_PORT_LDAPS from ..config.ldap import DEFAULT_TIMEOUT -__version__ = '0.4.6' +__version__ = '0.4.7' LOG = logging.getLogger(__name__) _ = XLATOR.gettext diff --git a/lib/pp_admintools/app/remove_ldap_user.py b/lib/pp_admintools/app/remove_ldap_user.py index b9d3c34..bade2c5 100644 --- a/lib/pp_admintools/app/remove_ldap_user.py +++ b/lib/pp_admintools/app/remove_ldap_user.py @@ -25,7 +25,7 @@ from . import AbortAppError, TimeoutOnPromptError from .ldap import LdapAppError from .ldap import BaseLdapApplication -__version__ = '0.4.4' +__version__ = '0.4.5' LOG = logging.getLogger(__name__) _ = XLATOR.gettext @@ -351,8 +351,10 @@ class RemoveLdapUserApplication(BaseLdapApplication): old_pwd_hash = attributes['userPassword'][0] changes['carLicense'] = [(MODIFY_ADD, old_pwd_hash)] changes['userPassword'] = [(MODIFY_REPLACE, self.raw_empty_passwd)] - changes['shadowExpire'] = [(MODIFY_REPLACE, self.shadow_expire)] - changes['loginShell'] = [(MODIFY_REPLACE, self.nologin_shell)] + if 'shadowAccount' in attributes['objectClass']: + changes['shadowExpire'] = [(MODIFY_REPLACE, self.shadow_expire)] + if 'posixAccount' in attributes['objectClass']: + changes['loginShell'] = [(MODIFY_REPLACE, self.nologin_shell)] LOG.info(_("Updating user info for {dn!r} on {inst} ...").format( dn=dn, inst=connect_info.url)) diff --git a/locale/de_DE/LC_MESSAGES/pp_admintools.po b/locale/de_DE/LC_MESSAGES/pp_admintools.po index 69af2e6..b369f5b 100644 --- a/locale/de_DE/LC_MESSAGES/pp_admintools.po +++ b/locale/de_DE/LC_MESSAGES/pp_admintools.po @@ -628,7 +628,7 @@ msgstr "Ergebnis der Änderung:" #: lib/pp_admintools/app/ldap.py:946 msgid "Deleting LDAP entry {dn!r} on {uri} ..." -msgstr "Lösche LDAP-Eintrag {dn!r} in {inst} …" +msgstr "Lösche LDAP-Eintrag {dn!r} in {uri} …" #: lib/pp_admintools/app/ldap.py:951 msgid "Simulation mode - deletion will not be executed." -- 2.39.5