Re: Running an App as Root
Re: Running an App as Root
- Subject: Re: Running an App as Root
- From: David Blanton <email@hidden>
- Date: Tue, 04 Nov 2003 19:35:29 -0700
On 11/4/03 6:01 PM, "Chris Hanson" <email@hidden> wrote:
>
On Nov 4, 2003, at 4:43 PM, David Blanton wrote:
>
> How can I distribute an app that will run as Root? I want to run
>
> scripts
>
> (chmod, chown) from the app that require Root privileges using NSTask.
>
>
You don't. What you do is distribute an application that runs as a
>
normal user, but that includes a helper tool that can be invoked uusing
>
the Security framework that performs tightly-constrained tasks as root.
>
This is what displays the standard authentication panel to users.
>
>
See Apple's sample code on their developer web site -- AuthSample and
>
MoreAuthSample -- and the documentation for the Security framework for
>
more details on how to actually do this. And be sure to understand
>
exactly how AuthSample and MoreAuthSample actually work before leaping
>
into your own code.
>
>
-- Chris
Thanks for the solution.
What we need to do is 'silently' do some root stuff, i.e. Not present the
Authentication Panel to accomplish our goals.
Well see about flipping some bits somewhere.
DB
_______________________________________________
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.