How to gain single user access due to a lost root password

Started by mauricio, February 10, 2024, 07:30:47 PM

Previous topic - Next topic



I've an SD card with Debian image on it (Bullseye).

I was developing on an A20, during last year.

I've forgotten the root password (also my common user password), so I can't do login.

I've tryed to login (through serial screen) in single user mode, after modifiying /boot/uEnv.txt, adding :

But login prompt is still asking me for a password:

Give root password for maintenance
(or press Control-D to continue):

If I press Control-D, I receive:

Reloading system manager configuration
Starting default target

And login prompt

Please, there is something I can do to gain access so I can reset password ?



Aside from what Google says about "reset forgotten root and user password" -maybe try to access the board via SHH over the Ethernet, the username and password should still be the original ones user olimex and password olimex
Technical support and documentation manager at Olimex


Thank you LubOlimex

I did change root and olimex password at the begining, last year, both forgoten

I did search for "reset forgotten root and user password", but since there's no GRUB but U-Boot

I stopped autoboot hitting any key at begining. But here on I don't know how to proceed to add "single" to boot options

Also found you can pass boot parameters using uEnv.txt file

# optargs - Optional arguments passed to the kernel

so I add

This last one seems to be wrong

Any help on how to pass "single" to boot options, so no login requiered ?

Or any other method. Some where in time (probably other linux image) I remenber twiking some option some where to enable/disable login requirement when connected through
serial cable, maybe?



Mount the SD card on another computer (laptop etc) and change the vital files involved in what you want e.g. edit /etc/passwd (& others) to make a root with no password.



Thank you JohnS

I've done as you said. Following this post I was able to login as root and reset all my passwords

Thanks !