title: Change user password with one Bash command line
body: <p>I am making a program with Python 2.7, I use shell commands to create new users on Ubuntu and I want to setup the password for the new user. I use command prompt (Bash) commands to create users. Is there a command line that would change user's password just with 1 shell command? I tried:</p>
  <pre><code>echo &quot;newpass&quot; | passwd --stdin user1 
  </code></pre>
  <p>but it appears the current Ubuntu 16.04 version I have doesn't have the <code>--stdin</code> parameter anymore. And I need that after the command is executed, the password would be set, I would not need to retype to confirm password etc (like using terminal).</p>