Forgot password to get into raspberry pi

Started by bobbyds1, August 20, 2020, 12:34:27 AM

Previous topic - Next topic

bobbyds1

is there any backdoor or master password to get into raspberry pi I forgot my password and cannot launch raspberri pi is there a way to reset.
any help would be greatly appreciated.


bobbyds1

when i try to go to that website it says site cant be reached


petera

Also have a read of this. It might be an easier route if you’re not that familiar with the Linux command line interface. Above all a Google search is your best friend. That’s what most do here when they answer queries https://howtoraspberrypi.com/recover-password-raspberry-pi/

petera

#5
You can also follow these simple steps. Use must use a plain text editor to edit the file mentioned. Don’t use the quote marks before and after the relevant entries. They are only used to highlight the relevant entries

to reset your password:

Power down and pull the SD card out from your Pi and put it into your computer.

Open the file 'cmdline.txt' and add 'init=/bin/sh' to the end. This will cause the machine to boot to single user mode.

Put the SD card back in the Pi and boot.

When the prompt comes up, type 'su' to log in as root (no password needed).

Type "passwd pi" and then follow the prompts to enter a new password.

Shut the machine down, then pull the card again and put the cmdline.txt file back the way it was by removing the 'init=/bin/sh' bit.

bobbyds1

this is what my commandline.txt file looks like when i add what you said in above post
console=serial0,115200 console=tty1 root=PARTUUID=56cd6262-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
init=/bin/sh


but when i boot up again and type su nothing happens

let me start from beginning i boot up my pi unit it asks for login which is raspberri then when it asks for my password thats what i cant remember.  so how do i correct that sorry if i am being a pain but i am new to linus I should have written the dam password down and I never should have changed it when i first set this up. any help would be appreciated.

petera

Quote from: bobbyds1 on August 20, 2020, 08:21:21 PM
this is what my commandline.txt file looks like when i add what you said in above post
console=serial0,115200 console=tty1 root=PARTUUID=56cd6262-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
init=/bin/sh


but when i boot up again and type su nothing happens

let me start from beginning i boot up my pi unit it asks for login which is raspberri then when it asks for my password thats what i cant remember.  so how do i correct that sorry if i am being a pain but i am new to linus I should have written the dam password down and I never should have changed it when i first set this up. any help would be appreciated.

Unless you've some exotic login settings the normal login is

User: pi
Password: whatever you set it as. The default is raspberry.

If you followed the instructions above and rebooted as instructed you enter su  Do a screen cap and let me see what's happening.

petera

You need to have a monitor, keyboard and mouse attached to your Raspberry Pi to carry this out. This is known as a local connection. When your Raspberry Pi boots you will see this all on the monitor.

The other connection is known as remote, connecting to your Raspberry Pi via a Windows computer using the likes of PuTTY. This is to prevent others hacking your Raspberry Pi and doing what you are trying to do now.

bobbyds1


petera

It looks to me that the previous instructions I supplied didn't take effect. Try

Login:pi
Password:raspberry

and let me know what happens

petera

If you get the login incorrect reboot the Raspberry Pi. When you are asked for login type su and press the Return key. At the Enter password leave it blank and just press the Return key.

petera

I'm finishing up here now. Time difference. Did any of that work for you.

bobbyds1


petera

There's no reason why my instructions didn't work. Make sure that used a plain text editor to edit that file. It's vital that no other characters are in that line that needs to be added to the cmdline.txt file and the file extension name is correct too. Windows seems to add things of its own to text files when saving them that Linux will not recognise. Double check that file again and follow the instructions I gave and don't be afraid to Google for help.