In Ubuntu by default first user account is an administrative account if you reset administrative account that’s enough again you gain access to system. How to Reset Forgotten Ubuntu Root Password Let’s see step by step guide.
How to Reset Forgotten Ubuntu Root Password
Ubuntu User Login Failed
I was trying to login to Ubuntu using my credentials. Oops i forgot Ubuntu Login details
reboot ubuntu machine
Click on Reboot
Reboot the Ubuntu server using above options
Advanced options for ubuntu
Select Advanced Options for Ubuntu and Hit Enter
Select Recovery Mode
Ubuntu, With Linux 4.4.0-57-generic (recover mode) you have to select and Hit Enter
Drop root shell
root – Drop to root shell prompt selection and Hit Enter.
Remount the file system with read-write because when you enter into the advanced with recovery mode file system will be read-only. With read-only file system we can’t do any modifications to the configuration files
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Password has been reset successfully.
Issue an reboot and boot with normal kernel That’s it.