I forgot my sudo password

I forgot my sudo password. I want to install a package and it needs me my sudo password. Every time I enter the password by chance. I get the error of try again. Would you please tell me how I can recover it or if I can change it in terminal Thanks a lot

3

1 Answer

From the official Ubuntu LostPassword documentation:

Reboot your computer. Hold Shift during boot to start GRUB menu. Highlight your image and press E to edit. Find the line starting with "linux" and append rw init=/bin/bash at the end of that line. Press Ctrl + X to boot. Type in passwd username. Set your password. 
3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like