• 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
Re: NSTask with admin power
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTask with admin power


  • Subject: Re: NSTask with admin power
  • From: "Shawn Erickson" <email@hidden>
  • Date: Mon, 26 Feb 2007 18:15:13 -0800

On 2/26/07, Andrew James <email@hidden> wrote:
In AppleScript i am able to run a command such as kextload with do shell
script "" with administrative rights.

How would i do this in cocoa, from my look over documentations i have been
unable to find any reference to telling NSTask to run with admin rights.

You can use AppleScript from Cocoa (see NSAppleScript) if that makes things easy for you (not sure how your script works). Likely you want to do things in a more correct way using Authorization Services. Review...

<http://developer.apple.com/documentation/Security/Conceptual/authorization_concepts/index.html>

My application already stores the username and password in NSString so how
would i make it work.

You (your code) shouldn't be asking for or storing usernames or passwords of user accounts.

-Shawn
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >NSTask with admin power (From: "Andrew James" <email@hidden>)

  • Prev by Date: launchctl - no response
  • Next by Date: Create a nsimage from the nsbitmapimagerep
  • Previous by thread: NSTask with admin power
  • Next by thread: Re: NSTask with admin power
  • Index(es):
    • Date
    • Thread