Hi All
I'm trying to simply write a script that will check if the currently logged in user is a admin.
I can get a list of admins by running
'dscl . read /Groups/admin | grep GroupMembership'
And I know when running a script through casper $3 is the user that’s logged in – I'm just having a issue putting it all together.
It might be better as an extension attribute though, Maybe a "Logged in user is admin" and the script can return a yes or no.
Can any scripting gurus provide any assistance? :)
Any help would be appreciated.
Regards
John