simple root authentication for executing shell scripts
simple root authentication for executing shell scripts
- Subject: simple root authentication for executing shell scripts
- From: "Huyler, Christopher M" <email@hidden>
- Date: Mon, 6 Oct 2003 14:38:26 -0400
- Thread-topic: simple root authentication for executing shell scripts
I have been searching the archives and sample programs but I can't seem
to find a simple solution to my problem. I am writing a PreferencePane
for our application which has several daemons that must be run as root.
On a normal unix machine you would su to root then type "InoStart" (a
fairly complex shell script) to start all the daemons. With my
preference pane, I got as far as using NSTask to launch the script but
now I need it to launch as root or sudo.
Can someone point me to some simple code that will accomplish this? I
looked at the MoreSecurity sample code and that seems like a lot of code
to perform such a simple task. I basically need an "authenticate" Obj-C
function that will run when the user presses the unlock button, and a
"start" Obj-C function that will execute a command-line script as root.
Sorry if this has been asked a million times,
~ Chris
--
Christopher Huyler
Computer Associates
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.