I\'m writing a shell script to automatically add a new user and update their password. I don\'t know how to get passwd to read from the shell script instead of interactively
You could use chpasswd
echo $1:$2 | chpasswd