Change default username on iMX6DL

Hi,

I am working with the following setup
Colibri iMX6DL 512MB V1.1Y
Colibri Evaluation Board Rev3.2
Linux 5.4.0

After initial setup involving changing the default user password I am attempting to also change the default username.

I am creating a temp user with sudo permissions, then using usermod -l to change the username from “torizon” to “myname” after which I delete the temp user.

This works as expected and I can now login via the new user name and password, however I have discovered I can also now login using the original credentials (torizon, torizon). I believe the cause of this is the nss-altfiles module which reads user information from an alternate location (in this case /usr/lib/passwd) however it appears the usermod call does not update these files to match the username change. This disconnect means I also cannot delete the user torizon as it is not seen.

Since these files are “read only file system” I cannot alter them manually either.

Do you have any advice on either updating these files to change the name of the torizon user/remove the torizon user? Or a better way to accomplish the name change that by passes this issue?

Any help would be appreciated.

Cheers,
Neil

Hi Neil, you have to reboot the module after executing sudo usermod -l myname torizon from your temp user session. For example, I also created a temp user tmpuser with sudo permission and renamed torizon to auser. With a reboot, the previous torizon user name is denied.

colibri-imx6-11094700 login: torizon
Password: 

Login incorrect
colibri-imx6-11094700 login: 
Login timed out afte
TorizonCore Upstream 5.7.2+build.20 colibri-imx6-11094700 ttymxc0

colibri-imx6-11094700 login: auser
Password: 
Last login: Tue Jan 30 05:14:23 UTC 2024 on ttymxc0