Re: Executing commands through Perl

2007-07-18 Thread Teresa Thomas
Exactly, I actually wish to run 'yum' through Perl, but I want to give (even) a non-sudoer the opportunity to authenticate for root and go ahead with the install. Tom Phoenix wrote: On 7/17/07, Teresa Thomas <[EMAIL PROTECTED]> wrote: But when I try to execute commands that require user inpu

Re: Executing commands through Perl

2007-07-17 Thread Jeff Pang
--- "Mr. Shawn H. Corey" <[EMAIL PROTECTED]> wrote: > You can't run su except from a terminal. This is > not part of Perl, it's > part of the security for su. There's no way > around this. > No way?I think Expect.pm can do this.Though putting passwords, especially root passwords, into scrip

Re: Executing commands through Perl

2007-07-17 Thread Tom Phoenix
On 7/17/07, Teresa Thomas <[EMAIL PROTECTED]> wrote: But when I try to execute commands that require user input (eg, su or yum while not on root), then it says 'standard in must be a tty' and fails. These are programs that don't expect to be run by other programs, but by humans. If you want to

Re: Executing commands through Perl

2007-07-17 Thread John W. Krahn
Teresa Thomas wrote: Perl's system() function seems to be working great for simple commands like 'pwd' , 'ls' that does not require user interaction. But when I try to execute commands that require user input (eg, su or yum while not on root), then it says 'standard in must be a tty' and fails

Re: Executing commands through Perl

2007-07-17 Thread Mr. Shawn H. Corey
Teresa Thomas wrote: Perl's system() function seems to be working great for simple commands like 'pwd' , 'ls' that does not require user interaction. But when I try to execute commands that require user input (eg, su or yum while not on root), then it says 'standard in must be a tty' and fails

Re: Executing commands through Perl

2007-07-17 Thread Teresa Thomas
Perl's system() function seems to be working great for simple commands like 'pwd' , 'ls' that does not require user interaction. But when I try to execute commands that require user input (eg, su or yum while not on root), then it says 'standard in must be a tty' and fails. Is this because Pe

Re: Executing commands through Perl

2007-07-17 Thread Matthew Topper
-- Forwarded message -- From: Matthew Topper <[EMAIL PROTECTED]> Date: Jul 17, 2007 6:17 AM Subject: Re: Executing commands through Perl To: Teresa Thomas <[EMAIL PROTECTED]> It sounds like Perl might be overkill for this. Personally, anytime I find myself using the

Re: Executing commands through Perl

2007-07-16 Thread John W. Krahn
Teresa Thomas wrote: Hi, Hello, Its my first time (first day actually!) using Perl and I would like some help in performing some relatively simple operations. My program outputs two columns of text based data. I want to parse this information, extract some contents and send the contents (w

Re: Executing commands through Perl

2007-07-16 Thread yitzle
You may also want to look at this: http://perldoc.perl.org/perlipc.html#Using-open()-for-IPC -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Executing commands through Perl

2007-07-16 Thread Mr. Shawn H. Corey
Teresa Thomas wrote: Hi, Its my first time (first day actually!) using Perl and I would like some help in performing some relatively simple operations. Welcome to the world of Perl. My program outputs two columns of text based data. I want to parse this information, extract some contents

Re: Executing commands through Perl

2007-07-16 Thread Chas Owens
On 7/16/07, Teresa Thomas <[EMAIL PROTECTED]> wrote: Hi, Its my first time (first day actually!) using Perl and I would like some help in performing some relatively simple operations. My program outputs two columns of text based data. I want to parse this information, extract some contents and