Moved rootFS to external drive -> password no longer working

Having issues with your DietPi installation or found a bug? Post it here.
Post Reply
ProXy
Posts: 14
Joined: Tue Oct 29, 2019 11:32 pm

Moved rootFS to external drive -> password no longer working

Post by ProXy »

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!
User avatar
Joulinar
Posts: 5149
Joined: Sat Nov 16, 2019 12:49 am

Re: Moved rootFS to external drive -> password no longer working

Post by Joulinar »

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-pa ... pberry-pi/

I need to say, I never tested it myself and you would do it on your own risk
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
MichaIng
Site Admin
Posts: 3106
Joined: Sat Nov 18, 2017 6:21 pm

Re: Moved rootFS to external drive -> password no longer working

Post by MichaIng »

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 :?).

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 :D. Yes that will work, just use passwd root instead, or echo 'root:123' | chpasswd (123 is the password) which does not ask for confirmation.
Post Reply