Re: Running Script as root using Sudo
Re: Running Script as root using Sudo
- Subject: Re: Running Script as root using Sudo
- From: Christopher Nebel <email@hidden>
- Date: Wed, 27 Feb 2002 11:46:02 -0800
On Wednesday, February 27, 2002, at 10:02 AM, garbanzito wrote:
at 2002 02 27, 08:31 -0600, they whom i call Chris Prew wrote:
Has anyone been able to get sudo to run from a script using stdin for
the
password
discussed many times in the archives...
do shell script "echo password | sudo -S command"
or
do shell script "sudo -S command <password.txt"
or better yet,
do shell script "command" with administrator privileges [password
"password"]
If you leave off the password parameter, it'll prompt you for it. This
makes it possible to create a script that will run on other people's
machines and isn't wildly insecure.
--Chris Nebel
AppleScript Engineering
_______________________________________________
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.