title: Adding newuser in docker container with sudo privileges
body: <p>Im trying to build a docker file and one of the reqt is to create a user with sudo permissions.</p>
  
  <p>Here is the bash script </p>
  
  <pre><code># quietly add a user without password
  adduser --quiet --disabled-password --shell /bin/bash --home /home/newuser --gecos "testuser" newuser
  # set password
  echo "testuser:testuser" | sudo chpasswd
  </code></pre>
  
  <p>and the docker compose file.</p>
  
  <pre><code>FROM ros
  RUN apt-get update 
  RUN apt-get install -y sudo
  ADD run.sh /usr/local/bin/run.sh
  RUN chmod +x /usr/local/bin/run.sh
  CMD ["/usr/local/bin/run.sh"]
  </code></pre>
  
  <p>When I run this build I get the following error. </p>
  
  <pre><code>chpasswd: (user testuser) pam_chauthtok() failed, error:
  Authentication token manipulation error
  chpasswd: (line 1, user testuser) password not changed
  </code></pre>