Maintaining Linux unique password

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?

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