Password recovery ? Topic is solved

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
Minam

Password recovery ?

Post by Minam »

Hello,

I have totally forgotten the root password I used on my rpi few months ago. T_T
Is there a way to recover a forgotten pasword or to reset the default root password ? Like in raspian with the cmdline.txt on the SD card.

dietpi is a wonderful OS by the way. Thanks a lot !

regards,

Minam
User avatar
k-plan
Posts: 416
Joined: Sun Feb 28, 2016 5:28 pm

Re: Password recovery ?

Post by k-plan »

Hey,
Minam wrote: Like in raspian with the cmdline.txt on the SD card.
Have you tried it? And change root pwd with:

Code: Select all

passwd root
:?:

http://www.forum-raspberrypi.de/Thread- ... n-wurde#m4
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal and Bitcoin.
Minam

Re: Password recovery ?

Post by Minam »

Thank you for your reply.

Yes I tried to modify the SD card. But I can't read the SD card on my computer. Something like "corrupted device..." and I can't see the files on the card.
I will try again in a few hours and give you more details.

no other solution then ?

Minam
User avatar
k-plan
Posts: 416
Joined: Sun Feb 28, 2016 5:28 pm

Re: Password recovery ?

Post by k-plan »

Minam wrote:no other solution then ?
http://www.forum-raspberrypi.de/Thread- ... n-wurde#m3
Minam wrote:But I can't read the SD card on my computer.
Windows?

Code: Select all

:~# lsblk -f -i
NAME        FSTYPE  LABEL    UUID                                 MOUNTPOINT
mmcblk0
|-mmcblk0p1 vfat    BOOT     FA16-1610                            /boot
`-mmcblk0p2 ext4             dcded1b7-5f4f-44dc-b738-28376a6a3b11 /
SD Card has 2 partitions:

- 1st is FAT 32 , Name; "BOOT" - Windows can read and write by default
- 2nd is Ext4 , Windows can read by default, so it will not show up in "Explorer"

Minam wrote:Something like "corrupted device..." and I can't see the files on the card.
If both file system on your SD Card are corrupt, and another Linux System (e.g. Linux VM or Live CD/USB Boot System) can't repair it, you can start from the scratch ...


Sorry, but I have faster format and burn DietPi image to sd card, let run down a DietPi-Automation Installation, then repairing a file system with a Linux live System or recovering lost passwords .....

If you fear of new installation and loosing date, why don't you use DietPi-Backup and store your User Data like described?
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal and Bitcoin.
Minam

Re: Password recovery ?

Post by Minam »

Hi,

Yes I was runing windows while trying to read the SD card. I will try on linux then.
My project is a minecraft server runing for a few months now so yes I fear a new installation ^^.

I will try again this weekend and let you know.

Thanks for the help

Regards,

Minam
Minam

Re: Password recovery ?

Post by Minam »

Hi

So I tried multiple times the "cmdline.txt" trick but couldn't succeed.

First it prevented the raspberry to boot. Then I opened the cmdline.txt file again to remove the init=/bin/sh and it booted again (but couldn't logged on SSH).

Now I don't know why but this cmdline.txt file is empty. I tried again to add init=/bin/sh but still not booting.
It's impossible to reset the root password.
svtz
Posts: 1
Joined: Sat Sep 07, 2019 9:57 am

Re: Password recovery ?

Post by svtz »

Hi all,

Managed to reset the password using the ext2fsd driver (on windows) and method 2 from here
Post Reply