go to linux recovery mode pressing esc button till boot option menu appears. then select advance options then select recovery mode option. then you should see following ui. select update grub boot-loader option to get the read write access to the system. then select drop to root shell prompt option. then press enter to go to root terminal. now you can change the password easily root@ubuntu:~# passwd nuwans Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully root@ubuntu:~# you are done. troubleshooting you might see a error like key string is not matching once you logged in to the system. you can delete the key-string file to create a new file. rm ~/.local/share/keyrings/login.keyring