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.
Back to
Seekers of Perl Wisdom