I forgot my Ubuntu password, can't open grub menu either, is there a way to fix this? Help please
I tried to open grub menu after turning on my PC, with ESC, shift nothing worked, also went to etc/default but could not find grub file
I forgot my Ubuntu password, can't open grub menu either, is there a way to fix this? Help please
I tried to open grub menu after turning on my PC, with ESC, shift nothing worked, also went to etc/default but could not find grub file
Obtain a copy of Ubuntu Install image or Live Image on a usb drive. Boot from that USB drive.
When the Install screen appears, press ctrl + alt F3, this will give you a shell. In the shell type, sudo bash
this will now give you root access.
Find the drive that has your original operating system installed with:
lsblk
then run:
mkdir /mnt/newroot
mount /dev/sdx /mnt/newroot (replace with the correct device you identified)
or if your root is on a lvm
mount /dev/mapper/....... /mnt/newroot (replace with the correct device you identified)
mount -R /run /mnt/newroot/run
mount -R /dev /mnt/newroot/dev
mount -R /proc /mnt/newroot/proc
mount -R /sys /mnt/newroot/sys
chroot /mnt/newroot /bin/bash
This will put you into a root shell of your orignal operating system, to change your password of your account, type:
passwd <username>
enter your new password when prompted.
you will now be able to reboot and log into your system as you normally would have.