busybox passwd can't use --stdin option, when i excute passwd,it need to input password twice,
i want to write a shell script to change auto because some reason.
i do passwd manual,it works fine。
your textbut when i write a script like this
#!/bin/sh
passwd << EOF
<new password>
<new password>
EOF
when i sh this script,the result is password for root is unchanged.
is there some wrong,i am a shell rookie,hope someone can help me,thank you!
i want sh script success!
While it is possible you just need to add a line with the current pass, THIS IS VERY DANGEROUS especially for the root user.
the script would look like this:
there is probably a much safer methode to do the thing you want to do, feel free to send me a message.