How can I pipe some input using echo
, into program that requires user typing something two times?
for example
echo "somepassword"|passwd someuser
creates this error message
Enter new UNIX password: Retype new UNIX password: passwd: Authentication token manipulation error
passwd: password unchanged
because I didn't retyped password
expect/auto-expect
I guess right tool for you. – Timbrel