# R16-Yocto-Adding-Root-Password

**URL:** <https://mangoh.discourse.group/t/r16-yocto-adding-root-password/6294>\
**Category:** mangOH Red\
**Created:** [March 9, 2021, 7:48am UTC](https://mangoh.discourse.group/t/r16-yocto-adding-root-password/6294 "2021-03-09T07:48:01Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Akshaysk](https://avatars.discourse-cdn.com/v4/letter/a/5f8ce5/32.png) [@Akshaysk](https://mangoh.discourse.group/u/Akshaysk)\
**Post date:** [March 9, 2021, 7:48am UTC](https://mangoh.discourse.group/t/r16-yocto-adding-root-password/6294/1 "2021-03-09T07:48:01Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [March 9, 2021, 7:55am UTC](https://mangoh.discourse.group/t/r16-yocto-adding-root-password/6294/2 "2021-03-09T07:55:30Z")

</div>

have you tried the “passwd” command?

---

<div class="post-metadata">

**Author:** ![Akshaysk](https://avatars.discourse-cdn.com/v4/letter/a/5f8ce5/32.png) [@Akshaysk](https://mangoh.discourse.group/u/Akshaysk)\
**Post date:** [March 9, 2021, 8:28am UTC](https://mangoh.discourse.group/t/r16-yocto-adding-root-password/6294/3 "2021-03-09T08:28:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [March 9, 2021, 9:25am UTC](https://mangoh.discourse.group/t/r16-yocto-adding-root-password/6294/4 "2021-03-09T09:25:14Z")

</div>

no idea…  
suggest you using passwd directly

---

<div class="post-metadata">

**Author:** ![Akshaysk](https://avatars.discourse-cdn.com/v4/letter/a/5f8ce5/32.png) [@Akshaysk](https://mangoh.discourse.group/u/Akshaysk)\
**Post date:** [March 9, 2021, 9:35am UTC](https://mangoh.discourse.group/t/r16-yocto-adding-root-password/6294/5 "2021-03-09T09:35:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [March 9, 2021, 10:01am UTC](https://mangoh.discourse.group/t/r16-yocto-adding-root-password/6294/6 "2021-03-09T10:01:33Z")

</div>

here says you need to set the following in local.conf:  
EXTRA\_IMAGE\_FEATURES=""

> **[Setting password for root user in Yocto](http://embeddedguruji.blogspot.com/2019/02/setting-password-for-root-user-in-yocto.html)**
>
> By default, if you have not made any modifications to 'EXTRA\_IMAGE\_FEATURES' variables, "debug-tweaks" option is set. $ bitbake -e rpi-ba...

---

<div class="post-metadata">

**Author:** ![jameswollaeger](https://avatars.discourse-cdn.com/v4/letter/j/e495f1/32.png) [@jameswollaeger](https://mangoh.discourse.group/u/jameswollaeger)\
**Post date:** [August 12, 2021, 9:45pm UTC](https://mangoh.discourse.group/t/r16-yocto-adding-root-password/6294/7 "2021-08-12T21:45:38Z")

</div>

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](https://forum.legato.io/t/bug-in-the-firmware-yocto-or-my-bb-file/2952/2?u=jwolla)

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

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [August 13, 2021, 12:06am UTC](https://mangoh.discourse.group/t/r16-yocto-adding-root-password/6294/8 "2021-08-13T00:06:53Z")

</div>

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

> **[Wp76 root password](https://forum.sierrawireless.com/t/wp76-root-password/17645/15)**
>
> It is working on other customer

---

<div class="post-metadata">

**Author:** ![jameswollaeger](https://avatars.discourse-cdn.com/v4/letter/j/e495f1/32.png) [@jameswollaeger](https://mangoh.discourse.group/u/jameswollaeger)\
**Post date:** [August 16, 2021, 2:51pm UTC](https://mangoh.discourse.group/t/r16-yocto-adding-root-password/6294/9 "2021-08-16T14:51:31Z")

</div>

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
