X10 Community Forum

📱🖥️PiX10Hub => 💬General Discussion => Topic started by: bobbyds1 on August 20, 2020, 12:34:27 AM

Title: Forgot password to get into raspberry pi
Post by: bobbyds1 on August 20, 2020, 12:34:27 AM
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.
Title: Re: Forgot password to get into raspberry pi
Post by: petera on August 20, 2020, 05:52:38 AM
http://mapledyne.com/ideas/2015/8/4/reset-lost-admin-password-for-raspberry-pi
Title: Re: Forgot password to get into raspberry pi
Post by: bobbyds1 on August 20, 2020, 07:56:03 AM
when i try to go to that website it says site cant be reached
Title: Re: Forgot password to get into raspberry pi
Post by: petera on August 20, 2020, 08:46:55 AM
Try https://mapledyne.com/ideas/2015/8/4/reset-lost-admin-password-for-raspberry-pi
Title: Re: Forgot password to get into raspberry pi
Post by: petera on August 20, 2020, 08:52:28 AM
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/
Title: Re: Forgot password to get into raspberry pi
Post by: petera on August 20, 2020, 09:02:20 AM
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.
Title: Re: Forgot password to get into raspberry pi
Post by: 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.
Title: Re: Forgot password to get into raspberry pi
Post by: petera on August 20, 2020, 08:56:48 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.
Title: Re: Forgot password to get into raspberry pi
Post by: petera on August 20, 2020, 09:13:43 PM
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.
Title: Re: Forgot password to get into raspberry pi
Post by: bobbyds1 on August 20, 2020, 09:36:41 PM
attached is a screen shot
Title: Re: Forgot password to get into raspberry pi
Post by: petera on August 20, 2020, 09:42:18 PM
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
Title: Re: Forgot password to get into raspberry pi
Post by: petera on August 20, 2020, 09:50:22 PM
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.
Title: Re: Forgot password to get into raspberry pi
Post by: petera on August 20, 2020, 09:51:34 PM
I'm finishing up here now. Time difference. Did any of that work for you.
Title: Re: Forgot password to get into raspberry pi
Post by: bobbyds1 on August 20, 2020, 09:57:51 PM
no none of that worked
Title: Re: Forgot password to get into raspberry pi
Post by: petera on August 20, 2020, 10:15:34 PM
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.
Title: Re: Forgot password to get into raspberry pi
Post by: bobbyds1 on August 21, 2020, 08:15:53 AM
i finally got it working found my password.

thanks for all your help
Title: Re: Forgot password to get into raspberry pi
Post by: petera on August 21, 2020, 09:21:40 AM
The instructions I gave you do work. I’ve just confirmed this if anyone finds themselves in a similar predicament. I know the edit you did on the cmdline.txt file using a Windows editor is where the problem lay. Anyway you found your password so all is well. What login user are you using. The default user is pi. Did you change that at any stage. If you have the desktop GUI enabled and set for auto login you’ll never have that problem again.
Title: Re: Forgot password to get into raspberry pi
Post by: bobbyds1 on August 22, 2020, 01:16:24 PM
i used notepad to edit the file but it did not work but on the bright side i finally remembered my password so i was finally able to log in, But thanks for all your help.
Title: Re: Forgot password to get into raspberry pi
Post by: brobin on August 22, 2020, 05:06:16 PM
For future reference, when you use Notepad be sure to turn off 'Word wrap' first.