Forgot dietpi login, looking for username and hashed password

Couldn’t find any other info about this.

Essentially I forgot my dietpi login username and password, or I might’ve mistyped it when I created the account and can’t login anymore. I’m wondering if there’s a way to get the username and hashed password from the SD card? Having the correct username would at least narrow down the login guesses…

As you answered in the other post, your can not see /etc when you insert the card into another machine.
What folders can you see? Did you mount it on another Linux machine or what exactly did you try?

I’m using a Mac to see the files/folders, just from the file explorer - not sure if I’m supposed to do something else to see more…?

But here’s a screenshot of what I’m seeing, it’s mostly a bunch of .dtb and .elf files with a few .txt and one folder (overlays) with a ton of .dtbo files.

Can you istead login via the root user (default password ‘dietpi’?
Then you could do a ‘passwd dietpi’ to set the password for the dietpi user.

MacOS does only see the vfat boot partition, but you need the ext4 root partition.
You need to mount it on a linux machine.

I think I must’ve changed the root user password since I tried both root user and dietpi user and both didn’t work…

Ah ok that makes sense, I’ll try that then. Thanks!

Using a Linux VM on Mac should give access to the ext4 partition

2 Likes

Found it, thanks everyone!

This topic was automatically closed 178 days after the last reply. New replies are no longer allowed.