If you’ve forgot your user password on Ubuntu, you can easily reset it if you have a recovery option in your Grub menu. Boot into recovery mode, select the root shell option, then use passwd to set a new password for your user. Further details here.
If you get this error:
Authentication token manipulation error
then your drive is mounted in read only mode. If you have an option in your recovery menu to mount in r/w mode, then do that first then drop back into the shell. Otherwise you can mount it yourself with this:
mount -rw -o remount /
More info here.