Hi All,
I’ve been using the following to find the names of the admin accounts on a computer:
set admins to do shell script "dscl . -read /Groups/admin | /usr/bin/grep GroupMembership"
In particular, for systems with multiple admin accounts, I need the name of the original user account (user 501) or if that’s been deleted, the admin account following that one. In my testing, the result of the above script appears to be a list of names of all admin accounts, in order of creation, so the first name on the list is usually the one I’m looking for, but I’ve found the ordering of the names is inconsistent. Anyone know of a better way to find the name of “user 501” in ASOC. Thanks in advance for any help.