Programs like passwd tend to re-open /dev/tty themselves to read from rather than using STDIN. You need to use something like Expect to run it on its own pty instead.
In reply to Re: Submitting password changes to external program
by Fletch
in thread Submitting password changes to external program
by Dietz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |