R16-Yocto-Adding-Root-Password

Hi there ,
Did anyone try adding root password for R16 Yocto i.e Yocto 2.5 (sumo) .
I tried adding the same by two methods but none of them seems to be working .

1st Method : Adding in local.conf

INHERIT += “extrausers”
EXTRA_USERS_PARAMS = “usermod -p legato123 root;”

2nd Method : Adding in /yocto/meta-swi/meta-swi-mdm9x28/recipes-core/images/mdm9x28-image.inc

inherit extrausers
EXTRA_USERS_PARAMS = “usermod -p legato123 root;”

Thanks & Regards

  • Ak

have you tried the “passwd” command?

Hi @jyijyi ,
Yes it works . But why we are unable to add it in yocto ?
Request you to try this at your end and let me know if I am missing something

no idea…
suggest you using passwd directly

Hi @jyijyi ,
writing a script / App in order to set the root password is not a correct approach .

here says you need to set the following in local.conf:
EXTRA_IMAGE_FEATURES=""

So i have followed this thread and tried to do it, but it doesn’t work. I don’t have any new WP modules to test with currently, so if we change the password for root user in the YOCTO build but the module being flashing already has another one set, does this mean the new one will not take effect? Does setting the default password only work on a brand-new module? Is there a way to make an old module back to factory setttings?

I found this post in legato forums: Bug in the firmware, Yocto or my bb file? - #2 by CoRfr - Legato Linux distribution (Yocto project) - Legato Forum

Is this a valid way to remove the already setup user without causing module corruption?

If you are using wp76, you can downgrade to r12 and use swiflash to recover to default state

1 Like

So i looked through forum posts and it wasn’t 100% clear to me. But i did find the way and I’ll document here so anyone can use this as reference:

  1. swiflash -m wp76xx -i WP76xx_Release12_ATT.spk (<–use whatever firmware you need for R12)
  2. swiflash -m wp76xx -r
  3. swiflash -m wp76xx -i mangOH-yellow-wp76xx_0.7.0.spk