[slightly OT] using sudo -S via shell

Ton Kuypers tkuypers at pandora.be
Tue Nov 22 07:58:06 EST 2005


Couldn't get it to work, but found a much better solution on "http:// 
developer.apple.com/technotes/tn2002/tn2065.html"

Now I just create an AppleScript and run it, works like a charm :-)

And with a little extra added to the functionality as a bonus:
"Note: Using sudo(8) with with administrator privileges is generally  
unnecessary and creates security holes; simply remove the "sudo"."

Thanks everybody for your help.

Ton

On 20-nov-05, at 21:17, Ken Ray wrote:

> On 11/20/05 12:50 PM, "Mark Wieder" <mwieder at ahsoftware.net> wrote:
>
>> Ken-
>>
>> Saturday, November 19, 2005, 11:01:52 AM, you wrote:
>>
>>> Here's how... in this case I'm using sudo to kill a process (the  
>>> id of which
>>> is in tPID):
>>
>>>     put "#!/bin/sh" & cr into tScript
>>>     put "pw="&tPassword & cr into tScript
>>>     put "echo $pw | sudo -S kill -9" && tPID & cr after tScript
>>>     get shell(tScript)
>>
>> And, obviously, that second line should say "after" tScript...
>
> Actually it's funny you mention that... it has worked for me with  
> that error
> in place, so perhaps the default shell I've been using works just  
> as well as
> sh.... anyway, you're right though - it should be "after".
>
> Ken Ray
> Sons of Thunder Software
> Web site: http://www.sonsothunder.com/
> Email: kray at sonsothunder.com
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the use-livecode mailing list