]> Frank Brehm's Git Trees - pixelpark/pp-admin-tools.git/commitdiff
Bugfixing
authorFrank Brehm <frank@brehm-online.com>
Thu, 8 Sep 2022 15:48:45 +0000 (17:48 +0200)
committerFrank Brehm <frank@brehm-online.com>
Thu, 8 Sep 2022 15:48:45 +0000 (17:48 +0200)
lib/pp_admintools/app/ldap.py
lib/pp_admintools/app/remove_ldap_user.py
locale/de_DE/LC_MESSAGES/pp_admintools.po

index 9142a40af1d5306e869de983af4c8c4d546063e4..12d5fb0dbb8e203eb6a1761d79022fe86d33b7d9 100644 (file)
@@ -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
index b9d3c34c63839574d74f7dcbabdb29c7aa069428..bade2c5d869b97c77b0970bbb02ee1632e50c910 100644 (file)
@@ -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))
index 69af2e6f065b1974817694ebd7aaaf004947f515..b369f5bc65829b076817332e9964da88b5d71fcb 100644 (file)
@@ -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."