Hi,
I'm making a cocoa app that needs to execute shell scripts as root/sudo, feed the output to a log drawer and handle any authentication requests. The app is basically a gui for a bunch of shell scripts that are already written, tried and tested. Normally I would run sudo /usr/local/myApp/myScript.sh in terminal, enter root password and just sit back and enjoy the output Instead I want to select 'myScript' from a cocoa menu, enter a root or admin password in a prompt box and enjoy that same output in a log drawer.
Will Authorization Services handle the authentication in this way? And can it also feed the output back? Or should I use something else? Also if within my scripts I was ssh'ing to another machine as root, could I bring up a password prompt for that too?
As you may have guessed, I'm pretty new to this so any help is massively appreciated.
Thanks very much.
Rob
I'm making a cocoa app that needs to execute shell scripts as root/sudo, feed the output to a log drawer and handle any authentication requests. The app is basically a gui for a bunch of shell scripts that are already written, tried and tested. Normally I would run sudo /usr/local/myApp/myScript.sh in terminal, enter root password and just sit back and enjoy the output Instead I want to select 'myScript' from a cocoa menu, enter a root or admin password in a prompt box and enjoy that same output in a log drawer.
Will Authorization Services handle the authentication in this way? And can it also feed the output back? Or should I use something else? Also if within my scripts I was ssh'ing to another machine as root, could I bring up a password prompt for that too?
As you may have guessed, I'm pretty new to this so any help is massively appreciated.
Thanks very much.
Rob