I wrote a script that I thought would send input to the terminal when the program request input. I use echo for this.
password=open1234
for I in "a" "b" "c" "d" "e" "f" "g"
do
passwd ${I}
echo ${password}
done
This is basically the form of the program. As you can see, i'm trying to change the passwords of multiple users using a script. The problem is that the input from echo never gets sent to the passwd program.