Showing results for 
Show  only  | Search instead for 
Did you mean: 

Determine local administrator accounts

Description: Retrieves a list of local administrator accounts.

What The Data Shows: Finds local accounts that are in the administrator group.


SELECT username, groupname, type, u.UID, g.GID, Description, comment 
FROM users u
JOIN user_groups ug ON ug.UID = u.UID
JOIN groups g ON g.GID = ug.GID
WHERE g.GROUPNAME = "Administrators"
AND u.type = "local";
1 Comment
Community Manager
Community Manager
Status changed to: Approved

thank you for your contribution, @cjohnston!

We are approving your submission, but wanted to note that we added the closing quotation mark and comma to the end of the query to make it complete.

Thank you again for submitting our first customer-generated query!