Reputation: 1243
I'm working on a product that is running Linux version 3.4.8 on an atmel micrcontroller.
I decided to connect to the device using the debug port but discovered it was password protected and nobody in the company knew the password.
I changed the shadow and passwd file via GPRS, (GPRS was fine), and rebooted. I can now access the device but if I try to set the password using paswd, when I reboot it doesn't accept my password, then I have to clear the shadow and passwd files again.
Any ideas why the passwd command does not work?
Upvotes: 0
Views: 700
Reputation: 573
It is possible that "/etc" is mounted on a ramdisk (or as tmpfs), which allows you to change the password at runtime but the changes are not propagated to the actual passwd and shadow files. The "/etc" is remounted on bootup from a flash device causing the old settings to be used.
After logging in to the system execute mount and check where "/" or "/etc" is mounted, then check the type. A value of tmpfs will prove the statements above. Also check if "/etc" is a link to a folder in "/var". "/var" is usually on tmpfs.
Upvotes: 1