Moomoo5
Posts: 7
Joined: Mon Jun 10, 2019 8:59 pm

Forgot my password.

Mon Jun 10, 2019 10:29 pm

So I was recently prompted for my raspberry pi 3's password, which hadn't happened in a long time, so I forgot it. I read tutorials on how to solve this. I followed the steps, which included editing the config file/s and booting to single user mode. I get to a point where I change my password, but when I change the config file to its original state and login, it takes me back to the login page. I try the same with a wrong password and instead it says incorrect password. Can you help?

User avatar
B.Goode
Posts: 9072
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Forgot my password.

Tue Jun 11, 2019 7:32 am

Welcome to the Raspberry Pi forums.

If you believe that the random uncited tutorials you have found are reliable and you have followed them accurately there are a couple of other possibilities:


This might be a symptom of there being insufficient free space in the root filesystem of your Operating System.


This might be a symptom of a microSD card that has spontaneously and irreversibly entered a read-only state.

Moomoo5
Posts: 7
Joined: Mon Jun 10, 2019 8:59 pm

Re: Forgot my password.

Tue Jun 11, 2019 1:21 pm

Is there any other way to recover/reset my password?

User avatar
B.Goode
Posts: 9072
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Forgot my password.

Tue Jun 11, 2019 1:27 pm

Moomoo5 wrote:
Tue Jun 11, 2019 1:21 pm
Is there any other way to recover/reset my password?

See the final post, from user @gkaiseril, in this very recent similar forum discussion: viewtopic.php?f=28&t=242285


(Although since the process looks similar to what you have already tried, maybe my other suggestions are relevant.. ?)

Moomoo5
Posts: 7
Joined: Mon Jun 10, 2019 8:59 pm

Re: Forgot my password.

Tue Jun 11, 2019 4:36 pm

The thing is, when the screen with the four raspberry's does nor say anything. It is just blank and then it continues to boot. Could the problem be that the sd card is corrupted? My windows 10 computer does sometimes say there are problems with it. So... I don't know. If not... can I create a new user? Thanks for your help. :D

User avatar
B.Goode
Posts: 9072
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Forgot my password.

Tue Jun 11, 2019 5:03 pm

Could the problem be that the sd card is corrupted? My windows 10 computer does sometimes say there are problems with it. So... I don't know. If not... can I create a new user?


Yes, it is possible (but far from certain) that the micro SD card is corrupted.

Writing a fresh version of the Raspbian Stretch Operating System to a fresh micro SD card as a comparison would check that possibility.

A Windows Operating System will almost always fail to recognise the linux-formatted root partition on the microSD card and advise, wrongly, that it needs to be formatted. That is a design decision on the part of Microsoft, not necessarily an indication that there is anything wrong with the card. Always refuse the offer to format the 'drive' containing your Raspbian installation.

To be able to create a new Raspbian user won't you need to log in first... ?

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12547
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Forgot my password.

Tue Jun 11, 2019 7:14 pm

The least frustrating way to re-gain access to your PI is to simply start again, and use Etcher to image your card with Raspbian.

Although technically possible (for a knowledgeable enough person) to recover your old password, IMHO its not worth the effort.
In principle if you have unfettered access to the hardware, you can do everything, including cracking your password, but linux doesn't make it easy.

let this be a lesson to write down your password, (when you change it) somewhere, sooner or later you need to look it up.

Moomoo5
Posts: 7
Joined: Mon Jun 10, 2019 8:59 pm

Re: Forgot my password.

Tue Jun 11, 2019 8:25 pm

umm... I did press format... this problem didn't occur until I changed the password though... If there isn't another way I may just reinstall rasbian. I have so many files though. Thanks for your help.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12547
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Forgot my password.

Tue Jun 11, 2019 8:29 pm

If you have NOT formatted your old card, I would image Raspbian on a new card, using Etcher, then you can use an USB cardreader connected to your PI to try to salvage files from your old card.

Moomoo5
Posts: 7
Joined: Mon Jun 10, 2019 8:59 pm

Re: Forgot my password.

Wed Jun 12, 2019 1:05 pm

Thank you. :)

dl324
Posts: 122
Joined: Mon May 06, 2019 7:33 pm
Location: Pacific Northwest, USA

Re: Forgot my password.

Wed Jun 12, 2019 1:29 pm

Moomoo5 wrote:
Tue Jun 11, 2019 8:25 pm
I have so many files though.
I'd suggest you get in the habit of backing up work you want to save. I do it daily. I copy the tar files to my Windows PC that's also backed up daily.

pfletch101
Posts: 565
Joined: Sat Feb 24, 2018 4:09 am
Location: Illinois, USA

Re: Forgot my password.

Sat Jun 15, 2019 8:39 pm

dl324 wrote:
Wed Jun 12, 2019 1:29 pm
Moomoo5 wrote:
Tue Jun 11, 2019 8:25 pm
I have so many files though.
I'd suggest you get in the habit of backing up work you want to save. I do it daily. I copy the tar files to my Windows PC that's also backed up daily.
Even better, set up Cron jobs to do this at times when your Pi is usually running. I have a series of Cron jobs backing up my 'workhorse' Pi (which runs 24/7) on a schedule which ensures that all important files are backed up once a month and all new or changed files are backed up at the end of each day.

Return to “General discussion”