this post was submitted on 25 Dec 2023
9 points (100.0% liked)
Ubuntu Linux
1609 readers
3 users here now
Linux for Human Beings.
Ubuntu is a popular Linux operating system for PC / mobile devices, etc.
Developed by Canonical & based on Debian (another older Linux OS) which is known for it's rock solid stability.
Ubuntu is trusted everywhere computing by professionals and common users alike.
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
You can boot into recovery mode from the boot menu, which will give you root access without any password. From there you can reset your user password with
passwd
.Or, if recovery mode does ask for a password...
you can edit Linux's commandline arguments in the bootloader to addinit=/bin/sh
and then it will boot to a root shell without a password. the rootfs will be mounted read-only, so, before usingpasswd
you need to first runmount -oremount,rw /
to remount it read-write.then run
passwd
(to set root's password) orpasswd user
(to setuser
's), and then runsync
to ensure the changes are flushed to disk, and thensync
twice more for superstitious/historical reasons, and then turn the computer off and back on. (thereboot
command will not work here.)