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
Nowadays, you can use this command:
echo "user:pass" | chpasswd