We are deploying some software that prompts for local admin credentials when executed, which is problematic as most of our users have Standard accounts. I wrote up these couple of lines in bash:
#!/bin/bash
#Runs $PROGRAM as localadmin admin account to avoid requiring admin rights
sudo -u localadmin open /Applications/Utilities/PROGRAM.app/Contents/MacOS/PROGRAM_BINARY
exit 0
and made it a policy available in Self-Service. This works, in that the program does the needful even if the user has a Standard account, however, the Terminal app launches as well, and does not go away after the software is done doing what it needs to do.
Is there a way to use the "open" command in a way that doesn't open Terminal? Or another way to execute an application as local admin?
Thanks,
-Mike