> -----Original Message----- > From: Stephen M [mailto:[EMAIL PROTECTED]] > Sent: Thursday, November 01, 2001 8:04 AM > To: [EMAIL PROTECTED] > Subject: Net::Telnet to change password > > > Hi, > > I have lots of unix machines to change the password on the > root account, the following code I have put together only > goes so far. > Looking at the messages file I can see the perl script log > into the system, and execute the passwd program, however it > just times out after that...... > I appears that the password program is waiting for > input but doesn't want to hit the next line. I was expecting > a time out on pattern match if anything..I have tried a few > variations with no luck. I have this is enough to troubleshoot with. > Can anybody shed some light on this? :) > > ... > # wait for the first password prompt > $telnet->waitfor('/password:.* $/i');
This is just a total guess, but that $ in the regex has me concerned. What is that supposed to match? A newline? passwd doesn't send a newline there. Have you tried removing it? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]