# MAC address keep changing every re-connection to the internet

**URL:** <https://hub.mender.io/t/mac-address-keep-changing-every-re-connection-to-the-internet/4856>\
**Category:** General Discussions\
**Tags:** yocto, variscite\
**Created:** [April 13, 2022, 11:36pm UTC](https://hub.mender.io/t/mac-address-keep-changing-every-re-connection-to-the-internet/4856 "2022-04-13T23:36:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![marizonne.villafranc](https://avatars.discourse-cdn.com/v4/letter/m/ad7895/32.png) [@marizonne.villafranc](https://hub.mender.io/u/marizonne.villafranc)\
**Post date:** [April 13, 2022, 11:36pm UTC](https://hub.mender.io/t/mac-address-keep-changing-every-re-connection-to-the-internet/4856/1 "2022-04-13T23:36:23Z")

</div>

Hi,

I noticed that every time the client re-connects to the mender server, the mac address which is the one used for identification is changed. I would like to ask which mac address does mender grab? Is it the mac address of the ethernet, or the 4G dongle or the wifi? Which in the code can I change it to always grab the mac address of the 4G dongle?

Thank you!

Kind regards,  
Marizonne

---

<div class="post-metadata">

**Author:** ![DimosthenisK](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dimosthenisk/32/1577_2.png) [@DimosthenisK](https://hub.mender.io/u/DimosthenisK)\
**Post date:** [April 14, 2022, 7:57am UTC](https://hub.mender.io/t/mac-address-keep-changing-every-re-connection-to-the-internet/4856/2 "2022-04-14T07:57:21Z")

</div>

Check out the mender-identity file. This contains the code for the MAC Address grabbing.

> **[Identity | Mender documentation](https://docs.mender.io/client-installation/identity)**
>
> Mender documentation

> **[Customize Mender | Mender documentation](https://docs.mender.io/system-updates-debian-family/customize-mender#identity)**
>
> Mender documentation

---

<div class="post-metadata">

**Author:** ![marizonne.villafranc](https://avatars.discourse-cdn.com/v4/letter/m/ad7895/32.png) [@marizonne.villafranc](https://hub.mender.io/u/marizonne.villafranc)\
**Post date:** [April 14, 2022, 11:23pm UTC](https://hub.mender.io/t/mac-address-keep-changing-every-re-connection-to-the-internet/4856/3 "2022-04-14T23:23:18Z")

</div>

HI,

Thank you for your response. I found the script in the target at /usr/share/mender/identity. I want to edit the mender-device-identity script and commit it but I couldn’t find it in the meta-mender package. I only found something like this in the mender-client.inc:

```auto
FILES_${PN} += "\
    ${datadir}/dbus-1/system.d/io.mender.AuthenticationManager.conf \
    ${datadir}/mender/identity \
    ${datadir}/mender/identity/mender-device-identity \

```

```auto
do_install() {
    oe_runmake \
        -C ${B}/src/${GO_IMPORT} \
        V=1 \
        prefix=${D} \
        bindir=${bindir} \
        datadir=${datadir} \
        sysconfdir=${sysconfdir} \
        systemd_unitdir=${systemd_unitdir} \
        install-bin \
        install-identity-scripts \

```

I tried to search for install-identity-scripts but couldn’t find it.

Please advise. Thank you!

Kind regards,  
Marizonne

---

<div class="post-metadata">

**Author:** ![marizonne.villafranc](https://avatars.discourse-cdn.com/v4/letter/m/ad7895/32.png) [@marizonne.villafranc](https://hub.mender.io/u/marizonne.villafranc)\
**Post date:** [April 15, 2022, 12:00am UTC](https://hub.mender.io/t/mac-address-keep-changing-every-re-connection-to-the-internet/4856/4 "2022-04-15T00:00:37Z")

</div>

> [@Updated Mender identity and inventory with Yocto](https://hub.mender.io/t/updated-mender-identity-and-inventory-with-yocto/1836):
>
> Introduction This tutorial will guide you through creating custom recipes for Yocto builds to modify the predefined Mender inventory and identity scripts. Prerequisites A configured Yocto environment . Please take a look at one of the following if you do not have this prepared: [Preparing the Yocto Project environment from scratch](https://hub.mender.io/t/preparing-the-yocto-project-environment-from-scratch/801)[Preparing the Yocto Project environment based on Mender demo environment](https://hub.mender.io/t/preparing-the-yocto-project-environment-based-on-mender-demo-environment) Enough Free Memory: Your system should have at least 50 Gbytes of free disk space for…
