Re: how to authenticate in order to run a sudo shellscript?
Re: how to authenticate in order to run a sudo shellscript?
- Subject: Re: how to authenticate in order to run a sudo shellscript?
- From: <email@hidden>
- Date: Thu, 4 Mar 2004 10:01:52 +1100
on Wednesday, March 03, 2004 6:06 PM "Mark Douma" <email@hidden> wrote
>
On Mar 01, 2004, at 1:11 AM, Andrew Oliver wrote:
>
>
> If you need to run with elevated/root privileges, use the 'do shell
>
> script'
>
> mechanism that's designed for this:
>
>
>
> do shell script "blah blah blah" with administrator privileges
>
>
>
> You'll be prompted for your password with authenticates you in the
>
> same way
>
> sudo does, then it runs the command.
>
>
Would anyone happen to know what "with administrator privileges" uses
>
to be able to run with root permissions? Like does it rely on shell
>
commands such as sudo or su (behind the scenes), or is it similar to
>
the "authexec" method which many apps to gain those permissions?
well, i don't know what internally happens, but "do shell with admin" seems
just to issue a sudo -S command:
once you are authenticated and you do "do shell with admin" again, the pw
dialog appears again, but you can type what ever you want and you still are
authenticated (!).
addionally, after authenticating there is an entry in /car/run/sudo for you
as it is when sudo authenticates you.
cheers, leo
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.