in reply to Re: Calling interactive programs from with a script
in thread Calling interactive programs from with a script

Second, this is really a unix question, not a perl one, since this is the way passwd works.
I disagree. He's not having problems with passwd per se, he's having problems accessing it through perl. There is a difference.

As for the original question, I think that part of the problem can have some light shed on it by the answer to the question "where do stdout and stderr go when you do a system call?" . Also, passwd expects a tty to be communicating with it, and has provisions to prevent things like scripts interfacing with it. Fortunately for you, Expect.pm is around. Expect simulates a tty, allowing you to script an interface to things like passwd.

thor

  • Comment on Re: Re: Calling interactive programs from with a script