I am trying to write a script that makes our network (active directory) users local administrator on their macs. I have the script that will do this:
dseditgroup -o edit -n /Local/Default -a networkuser -t user admin
but I am looking to replace 'networkuser' with the currently logged on user, or even all users on the computer. The reason for this, is I want to push this out to multiple computers using Apple Remote Desktop, and it would save a whole bunch of time than running the script individually per user.
Does anyone know how to edit this script so it will affect the currently logged on user, or all users on the computer?
Thanks
whoami
work for you in macland? it works in most linux shells.date
" prints "today is Fri May 9 12:56:46 EDT 2014" Edit: I surrounded teh "date" command in backticks, in the command above. SE appearently renders those a code samples, so you can't see them in my example.