Re: Scripting su or sudo on OS X
Re: Scripting su or sudo on OS X
- Subject: Re: Scripting su or sudo on OS X
- From: garbanzito <email@hidden>
- Date: Thu, 6 Dec 2001 21:27:12 -0700
at 2001 12 06, 16:24 -0800, they whom i call Gary Beberman wrote:
But, what if the command requires interaction. Suppose I need to su
to a different ID or sudo a command and I get asked for a password.
How do I provide a reply? I have naively tried variations on:
well, if you're willing to put your password in a script, it
shouldn't be a problem to put it in a file, at least
temporarily ... hence you could use the -S option:
do script with command "sudo -S somecommand <somefilewithyourpassword"
--
steve harley email@hidden