Moved rootFS to external drive -> password no longer working

Hello,

I did a fresh install on a rpi4 and the very first thing I did was moving the rootFS to the external drive. After the reboot all logins fail with incorrect password. I tried root and dietpi and also used the default password, but the system still won’t log me in.

Is there anything I can do now?

Thanks!

Hi,

are you able to attach a screen to see if it boot up correctly? If it boots correctly, and still password is not working, you have limited option. I did a quick search on the web and found following https://howtoraspberrypi.com/recover-password-raspberry-pi/

I need to say, I never tested it myself and you would do it on your own risk

If you have an external Linux system you can mount the RPi’s ext4 partition to, we could hack a boot script inside that changes the root user password. So don’t worry, we can get it fixed (if the underlying issue is not a deeper one, as passwords to not change when copying files :thinking:).

EDIT: Ah lol, I should have read the link that Joulinar posted, that is easier indeed since you don’t need to mount the ext4 :smiley:. Yes that will work, just use passwd root instead, or echo ‘root:123’ | chpasswd (123 is the password) which does not ask for confirmation.