title: How to automatically add user account AND password with a Bash script?
body: <p>I need to have the ability to create user accounts on my Linux (Fedora 10) and automatically assign a password via a bash script(or otherwise, if need be).</p>
  
  <p>It's easy to create the user via Bash e.g.:</p>
  
  <pre><code>[whoever@server ]#  /usr/sbin/useradd newuser
  </code></pre>
  
  <p>Is it possible to assign a password in Bash, something functionally similar to this, but automatically:</p>
  
  <pre><code>[whoever@server ]# passwd newuser
  Changing password for user testpass.
  New UNIX password:
  Retype new UNIX password: 
  passwd: all authentication tokens updated successfully.
  [whoever@server ]#
  </code></pre>