I'm trying to reset my Raspbian password, so I took the SD card to Windows and added the text init=/bin/sh
(including a space) at the end of the line of the file cmdline.txt
. I did that with Notpad++ to preserve Unix style line endings.
The full line is now
dwc_otg.lpm_enable=0 console=ttyAMA0 console=ttyUSB1 console=tty1 root=/dev/mmcblk0p2 rootwait init=/bin/sh
When booting, there's a line that says
/bin/sh: 0: can't access tty; job control turned off
Googling for this, I find that it often happens with IOs connected, which I don't. Anyway, I also tried adding avoid_safe_mode=1
in config.txt
.
Still the same issue. I'm running out of ideas and out of time. I have to keep the data on the SD card, so I can't simply reformat.
I have a Dell USB keyboard connected. I can see text via HDMI, but I can't type anything. NumLock on the keyboard does not react, so as far as I can say, the keyboard does not work. The keyboard itself is ok. I can use it on my laptop.
Raspbian says (among others):
usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
[...]
usb 1-1.2: Product: Dell USB Keyboard
usb 1-1.2: Manufacturer: Dell
I tried the suggestions here: I can't log in via SSH and I only have Windows as a external OS, so I can't mount the SD card to erase the password in /etc/passwd
.
How do I reset the password?
console=xxx
three times in yourcmdline.txt
? Also, you certainly don't need job control to change a password, you real problem is that the keyboard is not responding (likely due to the console misconfiguration). – Dmitry Grigoryev Jul 25 '22 at 10:31console=
. – Thomas Weller Jul 25 '22 at 10:48