Recover root administrator password Ubuntu

If you have lost you root user password in Ubuntu and you are unable to login to your administrator account in Ubuntu, then follow the given steps to recover the password of your admin account in Ubuntu.

1) At the system startup, in the grub menu, select the recovery mode option.
2)Now type the following commands :
  $mount -rw -o remount /
  $sudo passwd
  <give password for the current user>

You will be asked to re enter the password and you are done. Your root password is changed. Cheers!