ObjectiveThe objective is to reset lost root or user password on Ubuntu 18.04 Bionic Beaver Linux.
Operating System and Software Versions
- Operating System: - Ubuntu 18.04 Bionic Beaver
RequirementsPhysical access to your computer or virtual machine with the Ubuntu 18.04 Bionic Beaver installation is required.
- # - requires given linux commands to be executed with root privileges either directly as a root user or by use of
- $ - requires given linux commands to be executed as a regular non-privileged user
Boot Into GRUB menuThe first step is to reboot into the GRUB menu. If Ubuntu 18.04 Bionic Beaver is the only operating system installed you need to keep pressing
SHIFTfor the GRUB menu to show up.
Edit Grub MenuUsing arrows select the
Ubuntumenu or the menu you use to boot your system and hit the
ekey. This will allow you to edit the menu:
Navigate down with the arrow-down key until you can see a line ending with:
ro quiet splash $vt_handoff
Using your keyboard replace the following keywords.
ro quiet splash $vt_handoffTO:
Once you have made the change press
CTRL + xto perform boot into a single mode.
Reset passwordConfirm that your system partition is mounted as read/write (rw):
# mount | grep -w /If all good, reset your root password with the
# passwdAlternatively, you can reset your user password. The following linux command will reset the password for the
# passwd linuxconfig
RebootYour root password is now reset. Reboot your system:
# exec /sbin/init
Enter new UNIX password: Retype new UNIX password: passwd: Authentication token manipulation error passwd: password unchangedYour root partition is mounted read-only. Try:
# mount -o remount,rw /to resolve this issue.
[ end Kernel panic - not syncing: Attempted to kill init! exit code=0x0007f00Make sure that you removed the
splashboot option when editing the grub's menu item.
When trying to reboot with the
rebootcommand I get:
Failed to connect to bus: No such file or directory Failed to talk to init daemon.Ignore, and reboot with:
# exec /sbin/init