Browse Source

fix if not passwordattr

Simon Fonteneau 2 months ago
parent
commit
24890924e3
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      gapslib.py

+ 2
- 0
gapslib.py View File

@@ -111,6 +111,8 @@ def run():
111 111
 
112 112
             # Update if password different in dict mail pwdlastset
113 113
             password = testpawd.get_account_attributes(samdb_loc,None,param_samba['basedn'],filter="(sAMAccountName=%s)" % (str(user["sAMAccountName"])),scope=ldb.SCOPE_SUBTREE,attrs=[passwordattr],decrypt=True)
114
+            if not passwordattr in password:
115
+                continue
114 116
             password = str(password[passwordattr])
115 117
             update_password(mail, password, pwdlastset)
116 118
 

Loading…
Cancel
Save