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 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 let the human at the keyboard control those
programs, you can run them that way by linking them to the terminal.
If you want your program to control the program as if your program
were the human, that's tougher.
But nobody wants to run su, just like nobody wants to go to the
airport; you only do it because it lets you do the thing you _really_
want to do. su is a program you use because you want to run a
different program (as a different user), right? You probably want to
use sudo to do the different program more directly; unlike su, sudo is
made to be run by other programs.
Good luck with it!
--Tom Phoenix
Stonehenge Perl Training
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/