cspctec has asked for the wisdom of the Perl Monks concerning the following question:
Okay, I'm trying to write a script that will attempt to log in as su on my unix box, but I do not know how to send my password from the script when the system requests a password...
my $root = system("su"); my $password = "password"; print "$password"; print "\n";
Am I on the right path? The terminal just prompts for the root password and sits there waiting for a response, and I'm wanting the script to send the password.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Responding to terminal I/O
by CountOrlok (Friar) on Apr 17, 2013 at 18:01 UTC | |
by cspctec (Sexton) on Apr 17, 2013 at 18:08 UTC | |
by CountOrlok (Friar) on Apr 17, 2013 at 19:00 UTC | |
Re: Responding to terminal I/O
by 2teez (Vicar) on Apr 17, 2013 at 18:35 UTC |
Back to
Seekers of Perl Wisdom