We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6ce260f + 34f6ce2 commit c904f3aCopy full SHA for c904f3a
1 file changed
nxc/protocols/ldap.py
@@ -590,6 +590,9 @@ def check_if_admin(self):
590
for attribute in item["attributes"]:
591
if str(attribute["type"]) == "distinguishedName":
592
answers.append(str("(memberOf:1.2.840.113556.1.4.1941:=" + attribute["vals"][0] + ")"))
593
+ if len(answers) == 0:
594
+ self.logger.debug(f"No groups with default privileged RID were found. Assuming user is not a Domain Administrator.")
595
+ return
596
597
# 3. get member of these groups
598
search_filter = "(&(objectCategory=user)(sAMAccountName=" + self.username + ")(|" + "".join(answers) + "))"
0 commit comments