Skip to content

Commit 65bd7ae

Browse files
committed
Remove Administrators group as not found and readd check for dom admin in folders
1 parent 6c9c141 commit 65bd7ae

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

nxc/modules/presence.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ def on_admin_login(self, context, connection):
5353
admin_rids = {
5454
"Domain Admins": 512,
5555
"Enterprise Admins": 519,
56-
"Administrators": 544,
5756
}
5857

5958
# Enumerate admin groups and their members
@@ -113,7 +112,9 @@ def check_users_directory(self, context, connection, admin_users):
113112

114113
# for admin users, check for folder presence
115114
for user in admin_users:
116-
if user["username"].lower() in dirs_found:
115+
# Look for administrator.domain to check if SID 500 Administrator is present (second check)
116+
if user["username"].lower() in dirs_found or \
117+
(user["username"].lower() == "administrator" and f"{user['username'].lower()}.{user['domain']}" in dirs_found):
117118
user["in_directory"] = True
118119
context.log.debug(f"Found user {user['username']} in directories")
119120

0 commit comments

Comments
 (0)