title: How to add an user and re set the root user in yocto?
body: <p>I like to do some things for the build-in users of my yocto project:</p>
  
  <p>1.) set a password for root to "abc"</p>
  
  <p>2.) set the root shell for ssh login form /bin/sh to /bin/bash</p>
  
  <p>3.) add the user "customUser" with password "xyz"</p>
  
  <p>Think a simple recipe can do this. So far I tried @ myUser.bb:</p>
  
  <pre><code>SUMMARY = "admin + user"
  SECTION = "USR"
  LICENSE = "CLOSED"
  
  inherit extrausers useradd
  
  # how to
  # pw: abc
  # at bash: usermod -p $(openssl passwd abc) root
  # get a salted hash: openssl passwd abc
  # one possible result: 1Cw5PHLy76ps2
  # the command now looks: usermod -p 1Cw5PHLy76ps2 root
  
  # set image root password
  EXTRA_USERS_PARAMS = "usermod -p 1Cw5PHLy76ps2 root;"
  
  USERADD_PACKAGES = "${PN}"
  
  # password
  # "xyz"
  # openssl passwd xyz
  # result: y5UyLBO4GNAwc
  
  USERADD_PARAM_${PN} = "-u 1200 -d /home/customUser -r -s /bin/bash -p y5UyLBO4GNAwc customUser"
  
  do_install_append () {
      install -d -m 755 ${D}${datadir}/customUser
  
      # The new users and groups are created before the do_install
      # step, so you are now free to make use of them:
      chown -R customUser ${D}${datadir}/customUser
  
      # groups
      # chgrp -R group1 ${D}${datadir}/customUser
  }
  
  FILES_${PN} = "${datadir}/*"
  
  #ALLOW_EMPTY_${PN} = "1"
  </code></pre>
  
  <p>Any idea how to get this done?</p>