In an early stage of the ubuntu users forget the root password no problem, it happen sometimes. In that case they can’t able to install any new tools in his ubuntu machine. It asks root permission to install the new tools. They aren’t able to create a new user login also. So, here is the one easy way to reset the root password you just follow the below steps
you must need to boot in single user mode in your Ubuntu machine
Step 1: When you power on your ubuntu machine, press “shift” key continuously to get the grub loader screen.
Step 2: In Grub 2 menu, select the menu with Linux 18.104.22.168-generic-pae highlighted.
Step3: Press ‘e’ to edit the grub2 menu.
Step 4: Move the cursor to the line that starts with “linux /boot/vmlinuz-3.2.0-23-generic-pae”.
Step 5: Change the content “ro quiet splash $vt_handoff” To “rw init=/bin/bash”.
Step 6: Press “Ctrl+x” to continue boot to in single user mode.
Step 7: Now you will get prompt of the root user.
Step 8: Change root user password, $ passwd root
Step 9: Now sync and reboot the system
$ sync $ reboot -f
I hope you this blog is helpful for you 😀