I've been testing out a script to run the following command in Terminal:
sudo dseditgroup -o edit -d <accountname> admin
The command works fine when you put in the account name, but of course this is not ideal when there are about 100 Macs in scope. Is there any way to invoke the "current user" to be added to the line above? Ideally the script will check who is the current logged in user and remove their administrator rights. FWIW these are mobile AD accounts with local admin rights.
Thanks!
