shell() and sudo
Yennie at aol.com
Yennie at aol.com
Wed May 14 13:03:02 EDT 2003
I think this may be what you are looking for:
echo "password" | sudo -S ls
This pipes your password to the "sudo" command. The -S option to sudo reads
the password from stdin.
So something like this should work:
function sudoCMD pwd,cmd
put "echo"&"e&pwd"e&&"|"&&"sudo -S"&&cmd into shellCmd
return shell(shellCmd)
end sudoCMD
HTH
> Re: shell() and sudo
>
------------------------------
Brian Yennie
Chief Technology Officer
QLD Learning, LLC
www.QLDLearning.com
PH: (904)-997-0212
EMAIL: Yennie at aol.com
-------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.runrev.com/pipermail/use-livecode/attachments/20030514/d3d8e8fb/attachment.html>
More information about the use-livecode
mailing list