title: sudo and chpasswd on one line
body: <p>I need connect to server via <code>ssh</code> and change users' passwords without typing <code>ssh</code> or <code>sudo password</code>.</p>
  
  <p>I found some example but I cannot complete one command.</p>
  
  <p>I found this command for ssh connection without typing password and running <code>sudo</code> command for delete user:</p>
  
  <pre><code>sshpass -p $admin_password ssh -t $admin@$server "echo $admin_password | sudo -S /usr/sbin/userdel -r $usr"
  </code></pre>
  
  <p>then I found command for change users password:</p>
  
  <pre><code>echo "$usr:$password" | sudo -S /usr/sbin/chpasswd;
  </code></pre>
  
  <p>Finaly, I want something like this:</p>
  
  <pre><code>sshpass -p $admin_password ssh -t $admin@$server "echo $admin_password | sudo -S echo "$usr:$password" | sudo -S /usr/sbin/chpasswd;"
  </code></pre>
  
  <p>Do you have any ideas?</p>