Forgot password for ubuntu in vmware

I have installed VMware and by mistake, I have forgotten my password for ubuntu. So kindly let me know how can I reset my password.

@sharmarohitganesh727 You will need root access to Ubuntu in order to reset the password. If you do not have that password, then I am not sure if you will be able to reset the password.

If you do have the root password, follow the instructions in the link below to reset it.

@sharmarohitganesh727 Follow these steps to reset the lost password-
1.Power off ubuntu.
2. Press shift during boot to start the GRUB menu.
3. Press e to edit.
4. Find 2nd last line starting with linux and append the line ‘ro and after that’ to ’ rw init=/bin/bash’ at the end of that line.
5. Press Ctrl+X to boot
6. Type in [ passwd username ]
7. set your password
8. Exit
I also solved the same issue and this helped me to reset my password.