Do not forget that passwords start with {crypt}
[mirror/userdir-ldap.git] / UDLdap.py
index f11c8b3..ffdb6b0 100644 (file)
--- a/UDLdap.py
+++ b/UDLdap.py
@@ -3,7 +3,7 @@ import time
 import userdir_ldap
 
 class Account:
-    array_values = ['keyFingerPrint', 'mailWhitelist', 'mailRBL', 'mailRHSBL', 'supplementaryGid', 'sshRSAAuthKey']
+    array_values = ['keyFingerPrint', 'mailWhitelist', 'mailRBL', 'mailRHSBL', 'supplementaryGid', 'sshRSAAuthKey', 'sudoPassword']
     int_values = ['shadowExpire', 'gidNumber']
     defaults = {
                  'accountStatus': 'active',
@@ -55,7 +55,7 @@ class Account:
     def pw_active(self):
         if self['userPassword'] == '{crypt}*LK*':
             return False
-        if self['userPassword'].startswith("!"):
+        if self['userPassword'].startswith("{crypt}!"):
             return False
         return True