Unable to log in and unable to reset the password [duplicate]

Solution 1:

  • Reboot the system and hold down the SHIFT key before the system boots into Ubuntu.
  • Choose the Recovery Mode using Arrow keys and press ENTER.
  • Choose 'root' from the list that appears. It will bring up the command line interface.
  • Type rm ~/.Xauthority and hit ENTER.
  • Type rm -rf ~/.config/autostart and hit ENTER.
  • Type shutdown -r now to reboot the system.

What this does is that it just deletes a couple of configuration files (nothing to worry).