# Maintaining Linux unique password

**URL:** <https://hub.mender.io/t/maintaining-linux-unique-password/3244>\
**Category:** General Discussions\
**Created:** [February 18, 2021, 2:48pm UTC](https://hub.mender.io/t/maintaining-linux-unique-password/3244 "2021-02-18T14:48:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kbuck3](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@kbuck3](https://hub.mender.io/u/kbuck3)\
**Post date:** [February 18, 2021, 2:48pm UTC](https://hub.mender.io/t/maintaining-linux-unique-password/3244/1 "2021-02-18T14:48:03Z")

</div>

All of our devices have unique usernames and passwords for when we create an SSH session into the device. How do we maintain each device’s username and password when deploying a new release of our rootfs-image?

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [February 18, 2021, 5:57pm UTC](https://hub.mender.io/t/maintaining-linux-unique-password/3244/2 "2021-02-18T17:57:07Z")

</div>

Hi @kbuck3 the images deployed won’t have the per-device data so extra steps will need to be taken.

The first approach people take for these kinds of settings is to move the files into /data and replace the original locations with a symlink. I’m not sure if that will work for the `/etc/passwd` and `/etc/shadow` files which contain the login credentials. I’ve never tried but you can certainly attempt it and see if it works.

Alternatively you can use a [state script](https://docs.mender.io/overview/state-script) to propagate the data from one install to the next. I think if you just store the updated `/etc/passd` and `/etc/shadow` files somewhere in the persistent `/data` partition, you can just copy them into place using an `ArtifactCommit_Enter` script.

Drew
