[slightly OT] using sudo -S via shell
David Bovill
david at openpartnership.net
Tue Nov 22 09:09:08 EST 2005
On 22 Nov 2005, at 13:58, Ton Kuypers wrote:
> 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 :-)
Thanks for the pointer! Something like this (not tested):
on sudo_DoCommand someShellCommand, myUserName, myPassword
-- http://developer.apple.com/technotes/tn2002/tn2065.html
put "do shell script '[[someShellCommand]]' user name
'[[myUserName]]' password '[[myPassword]]' with administrator
privileges" into someAppleScript
replace "'" with quote in someAppleScript
put merge(someAppleScript) into someAppleScript
do someAppleScript asw AppleScript
return the result
end sudo_DoCommand
More information about the use-livecode
mailing list