in reply to Re: How do I send a password to a command I start with Perl's Expect.pm
in thread How do I send a password to a command I start with Perl's Expect.pm

Thanks for reminder, my script login as root using ssh keys so I don't think is an issue.

My problem here is very simple actually if only the affected system(HP-UX) will support it. I just simple need to change/update the password of the user, so I did is login the system as root via Net::SSH::Perl, and execute 'passwd username' after that the system will prompt for new password for that user thus my problem arise, how to supply/key-in the password on the prompt, the same reason I try to use Expect.pm but as I don't how to use it then came this seek for help.

  • Comment on Re^2: How do I send a password to a command I start with Perl's Expect.pm