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=""