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
Have you looked at the -p option of adduser (which AFAIK is just another name for useradd)? You may also want to look at the -P option of luseradd which takes a plaintext password, but I don't know if luseradd is a standard command (it may be part of SE Linux or perhaps just an oddity of Fedora).