Passing input into passwd using pipe
11,479
You need to send the password twice:
(echo 'somepassword'; echo 'somepassword') | passwd someuser
Author by
user3667832
Updated on June 18, 2022Comments
-
user3667832 almost 2 years
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