I’m having a hard time trying to write a fixlet to determine if the logged in user is part of the admin group on Mac OS X. Has anyone worked with groups on Mac OS X? Could you please share how you did this? I can get the users primary group but that does not help for checking for admin privileges.
exists strings of it whose (string of it = (name of logged on user) ) of values of array “users” of dictionary of file “/private/var/db/dslocal/nodes/Default/groups/admin.plist”
Will return true if the logged on user is a member of the admin group.
Note that you have to run QnA as root on the Mac to access the admin.plist file if you want to test this relevance in QnA.