On 01/29/2012 07:53 AM, Rajeev Prasad wrote:
Hi Salva,
thx, but the installed sudo version does not have -S option. so i am not sure
how will i then pass the password....
Yes, with older versions of sudo, using Expect is probably the best way.
That may also work:
my $output = $ssh->capture({tty => 1,
stdin_data => "$pass1\n"},
"/usr/local/bin/sudo",
"-k", $cmd, @cmd_args);
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/