Password lost

Hello,
i have forget my password for logging with putty on my raspberry/flightaware.
is there a way to reset it or to find it?
Thanks

the default username and password for the FA image are:
username: pi
password: flightaware
Since you use the package addon it will very likely be something else.

On the raspberry Pi forum there is another more complicated way.
https://forums.raspberrypi.com/viewtopic.php?t=334962
If that doesn’t succeed you are faced with a fresh install I’m afraid.

1 Like

If you have another linux box there is ways to mount the root file system, use chroot and set a new password.
But that might be a bit involved, otherwise search for instructions and you’ll likely find some.

If you’re going for a fresh install, there is the piaware image you might already be familiar with.

You could also start with Raspberry Pi OS and just install things:
https://github.com/wiedehopf/adsb-wiki/wiki/Raspbian-Lite:-ADS-B-receiver

Or a premade image that’s not connected to any of the aggregators: http://adsb.im/

Slip out microSD card from Pi, insert into USB card reader and plug the card reader into USB slot of a Linux computer. Please note that a RPi running Raspberry Pi OS is a Linux computer, so if you have another running RPi, you can use it as a Linux computer to crack the encrypted password stored in file /etc/shadow of the Pi whose password you have forgotten.

John is a password cracking tool which comes as standard in Kali Linux, and can also be installed on Debian by command sudo apt install john

This video explains how to crack password hashes stored in /etc/shadow using tools like John the Ripper.

 

Why would you try cracking it if you can just set a new password.

Maybe rather dig out a guide for that?

Cracking /etc/shadow is gonna take significant resources usually.
Well unless you have some password list and the password is on the list.
Still.

I have a RPi running RaspberryPi OS Bookworm with following:
username = pi
password = raspberry.

I checked it’s file /etc/shadow, and it had lot of lines. I scrolled down slowly, looking for a line starting with pi, and found only one line which starts with pi. That line is as follows::


pi:$5$8ZbsZQXUT6$C8HtyaOs9enLTQRccSC4EBYz565GJPjihdA38EMnlEA:20221:0:99999:7:::

If someone has not changed user from pi to something else, then if he replaces line starting with pi in his microSD card’s file /etc/shadow, by the line I have given above, his password will become raspberry.

VERY IMPORTANT:
(1) When copy-pasting above line into file sd-root/etc/shadow, make sure that you copy-paste above line in full including pi at start of line, and last three ::: at the end of line.

(2) Make sure that there is no blank space left after the end of line i.e. no blank space after last three :::

To gain access to his microSD card’s files, one will need to insert the microSD card into a USB Card Reader, and plug the card reader into USB slot of a Linux computer. Please note that if someone has another running RPi with Raspbian OS, it is a Linux computer, and can be used to access files on microSD card which is plugged into it’s USB port.

Last step:
After editing & saving file sd-root/etc/shadow, eject / unmount the microSD card by following command:

sudo umount /dev/sda2  

After ejecting / unmounting the microSD card , pull out the card reader from USB port of running RPi / Linux Computer. Next slip the microSD card into SD card slot of original RPi, powerup, SSH and login using following credentials:

username = pi
password = raspberry

Once logged-in, change the password to whatever you desire.
 

Editing cmdline.txt boot to su shell and change it is a bit easier.

@oblivian

You cannot SSH to su/root shell. You will need to connect monitor & keyboard to Pi

And if you’re telling someone to remove the SD and stick it in a computer. Chances are they have a screen attached to use.

@oblivian

That computer in which the microSD card will be inserted to edit cmdline.txt will be a PC or a Laptop. In case of PC, the user has to disconnect monitor & mouse from PC and connect it to RPi to boot into su/boot shell. In case of a Laptop, it is not possible to detach its monitor & keyboard and connect these to RPi.

THANKS for all these responses, finally i restart with a new sd card and reinstall all software, now all is working well

2 Likes