title: Which symbols can be used in `openssl passwd -crypt`?
body: <p>I am writing a bash script to create user logins. Everything is fine apart from the password encryption. My code is something like this:</p>
  
  <pre><code>MYPASS="randomString"
  CRYPTPASS="$(openssl passwd -crypt $MYPASS)"
  sudo usermod -p $CRYPTPASS newUsername
  </code></pre>
  
  <p>I've just had problems with a password that contained <code>$</code>, <code>!</code> and <code>#</code>. I'm assuming the problem was with the encryption in the <code>openssl</code> command.  I'm not sure which symbol(s) were causing the problem but the only way it would work for this particular login was to remove all the symbols. However, in a different password, the <code>+</code> symbol worked fine. </p>
  
  <p>I'd like to use as many symbols as possible. Which characters should be avoided in <code>openssl passwd -crypt</code>? What is the problem with this method? Are there other methods of encryption where more symbols could be used?</p>
  
  <p>Thanks.</p>