$PASSWD = "/bin/passwd"; $telnet->cmd($PASSWD) or report_error("ERROR", "No password prompt fou +nd, contact Information Technologies: "); $telnet->waitfor('/password: ?$/i') or report_error("ERROR", "No passw +ord prompt found, contact Information Technologies: "); $telnet->print($password); $telnet->waitfor('/new password: ?$/i') or report_error("ERROR", "No p +assword prompt found, contact Information Technologies: "); $telnet->print($new_password); $telnet->waitfor('/new password: ?$/i') or report_error("ERROR", "No p +assword prompt found, contact Information Technologies: "); $telnet->print($new_password); $telnet->waitfor('/changed/'); ..... sub report_error { #give out std error message and write error to a log file }
by the way thanks for all the help that was, is, and will be
In reply to Net::Telnet and changing passwords by jcpunk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |