1

I ran a sudo apt upgrade, rebooted, and now I can't log in.

The odd thing is this... when I provide known invalid credentials the login dialog reports 'Incorrect password' in a red block, like so:

enter image description here

... but when I enter my known correct credentials the dialog disappears entirely for a moment and then returns with the password field empty (no red block).

Unfortunately I didn't enable SSH on this one, and have been connecting solely via VNC (lesson learned).

FYI the RPi is local, on the same LAN—if that helps.

Am I out of luck? Will I have to reinstall from scratch? (I sure hope not.)

16
  • Have you tried to login to the terminal and confirm that you are still able to do so?
    – crasic
    Aug 24, 2022 at 21:50
  • Putting a file into your /boot directory called ssh should cause the sshd to start (touch ssh if you have another linux box, or just create an empty text file). Of course, ssh will need a password also.
    – NomadMaker
    Aug 24, 2022 at 21:51
  • @crasic — When you say 'terminal,' are you referring to a bash terminal? Or to the RPi directly and without VNC?
    – InteXX
    Aug 24, 2022 at 21:56
  • @NomadMaker — Catch 21. I would have to be able to log in to create such a file in that location. No?
    – InteXX
    Aug 24, 2022 at 21:57
  • /boot is formated as a FAT32, so Windows or Mac should be able to read or write in the /boot partician.
    – NomadMaker
    Aug 24, 2022 at 21:59

1 Answer 1

2

You can boot to a root shell and reset password See https://raspberrypi.stackexchange.com/a/123850/8697.

Upgrade SHOULD NOT change password; ideally you should backup BEFORE upgrade.

This requires that you modify cmdline.txt - which can be done on any computer (even a Pi with a fresh OS).

3
  • I don't think it changed my password. I think login is succeeding, but maybe the desktop is crashing or something. That's why the dialog doesn't report 'Incorrect password,' but instead disappears for a moment and then comes back.
    – InteXX
    Aug 24, 2022 at 23:57
  • I tried adding init=/bin/sh to the end of cmdline.txt, but it still boots to the credentials dialog. Perhaps my Windows text editor added CRs to the file, and Buster doesn't like that. I do know that my current config replaces tabs with spaces on file save, so that might be mucking with things. To your knowledge, does cmdline.txt require any tabs?
    – InteXX
    Aug 25, 2022 at 0:02
  • "does cmdline.txt require any tab" - definitely NOT - not sure what it may do with them if present.
    – Milliways
    Aug 25, 2022 at 0:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.