username passwd expect
- From: "onlineviewer" <lancerset@xxxxxxxxx>
- Date: 13 Sep 2006 21:36:03 -0700
Hello All,
I have an array where @array[0] contains all the usernames and
@array[1] contains the corresponding passwds. I am trying to use the
expect module to send the passwd when prompted for passwd. I have the
following so far, but i'm not sure if i am approaching this the right
way. And the syntax for the expect object doesnt seem to be right
either. Any suggestions? Thanks
use strict;
use Expect;
foreach my $val($values[0]){
system `useradd $val`;
system `passwd $val`;
my $exp = new Expect;
$exp->send("$values[1]");
$exp->send("$values[1]");
}
.
- Prev by Date: Re: Net-DHCPClient cant get timeout
- Next by Date: Net::IRC and ctcp ping response
- Previous by thread: Net-DHCPClient cant get timeout
- Next by thread: Net::IRC and ctcp ping response
- Index(es):
Relevant Pages
|
|