• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
simple root authentication for executing shell scripts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: simple root authentication for executing shell scripts
      • From: Chris Hanson <email@hidden>
    • Re: simple root authentication for executing shell scripts
      • From: Sailesh <email@hidden>
  • Prev by Date: Re: Lock Screen ?
  • Next by Date: Re: Lock Screen ?
  • Previous by thread: Re: Lock Screen ?
  • Next by thread: Re: simple root authentication for executing shell scripts
  • Index(es):
    • Date
    • Thread