# Adding connections to network manager in the field

**URL:** <https://forums.balena.io/t/adding-connections-to-network-manager-in-the-field/22661>\
**Category:** Product support\
**Tags:** support, wifi\
**Created:** [July 30, 2019, 6:19pm UTC](https://forums.balena.io/t/adding-connections-to-network-manager-in-the-field/22661 "2019-07-30T18:19:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tacLog](https://avatars.discourse-cdn.com/v4/letter/t/ecae2f/32.png) [@tacLog](https://forums.balena.io/u/tacLog)\
**Post date:** [July 30, 2019, 6:19pm UTC](https://forums.balena.io/t/adding-connections-to-network-manager-in-the-field/22661/1 "2019-07-30T18:19:03Z")

</div>

Hey all,

I shipped a bunch of devices with the wrong connection files in the resin-data partition.

To hack them into working with new connections in the field, I found where all the connection file live:  
`find / -name "resin-wifi-01"`

3 things will show up:  
`/etc/NetworkManager/system-connections/`  
where things are running from now linked with the one below  
`/mnt/state/root-overlay/etc/NetworkManager/system-connections/`  
where you can edit things, seem like this is  
`/mnt/boot/system-connections`  
-where things are loaded when you flash it in person, and I wish I could put them in the field

Then I was just let shove some files in there and see what happens with:

echo "[connection]  
id=client\_connection  
type=wifi

blah blah blah sercrets sssssshhhhhhhhhhh  
" \>\> /mnt/state/root-overlay/etc/NetworkManager/system-connections/client\_connection

Then I confirm with: cat /mnt/state/root-overlay/etc/NetworkManager/system-connections/client\_connection

All this was only possible because I had the client put up a new network with the creds the devices shipped with. I put two profiles, one for use and one I could have an installer set up in a pinch without sharing client secrets.

I am worried that an OS update will wipe these new profiles and was wondering if there was a more permanent way to put things in place. I know there is a DBUS API, and if I have to explore that route I will but I don’t understand how that is more permanent unless that depends on my container updating the connections every time which is not a good solution for me.

If I have to do this in the future I would rather have a script do this thru the balena api interface.

How badly did I hurt my future self? 🙂  
Will OS updates roll out automatically?

Thanks!

---

<div class="post-metadata">

**Author:** ![thundron](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/thundron/32/1379_2.png) [@thundron](https://forums.balena.io/u/thundron)\
**Post date:** [July 30, 2019, 6:58pm UTC](https://forums.balena.io/t/adding-connections-to-network-manager-in-the-field/22661/6 "2019-07-30T18:58:30Z")

</div>

Hi, should you need to change connection on-the-fly, you can safely create/modify the file(s) in `/etc/NetworkManager/system-connections/` then copy it over to `/mnt/boot/system-connections`, OS updates should preserve those changes as well 🙂 you’ll just need to reboot the device after the change

---

<div class="post-metadata">

**Author:** ![tacLog](https://avatars.discourse-cdn.com/v4/letter/t/ecae2f/32.png) [@tacLog](https://forums.balena.io/u/tacLog)\
**Post date:** [July 30, 2019, 7:22pm UTC](https://forums.balena.io/t/adding-connections-to-network-manager-in-the-field/22661/8 "2019-07-30T19:22:38Z")

</div>

I am slightly amazed at the things I miss that seem so obvious after.

Thanks for that, for some reason I was under the impression I couldn’t cp to `mnt/boot/system-connections`

I just confirmed that this does work.

-Thomas

---

<div class="post-metadata">

**Author:** ![thundron](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/thundron/32/1379_2.png) [@thundron](https://forums.balena.io/u/thundron)\
**Post date:** [July 30, 2019, 7:25pm UTC](https://forums.balena.io/t/adding-connections-to-network-manager-in-the-field/22661/9 "2019-07-30T19:25:18Z")

</div>

I can assure you that you’re not the only one to whom this happens!  
No problem 🙂
