I recently forgot my admin account password on my laptop. I managed to enter the grub menu at boot, getting on to root shell (recovery mode --> drop into root shell prompt). From there all I had to do was select maintenance, then passwd -username-. The admin password was reset to my input and I could access.
This was good for me this time but is it not unsafe? If laptop was stolen a attacker could easily override the passwords. Is there some security setting I have missed?