Reset forgotten password in Ubuntu

  1. Power on your computer
  2. Press and hold your left SHIFT key , this will bring you into the grub menu
  3. After going into grub , press “e” to edit the boot command

4.Scroll down and find the line starts with “linux /boot/vmlinuz” and add “init=/bin/bash” to the end of this line , you can refer screenshot below

5.Press F10 to boot
6.Now you enter the command line, here can you run below command to remount the “/”

mount -rw -o remount /

and use below command to reset your password.(if you also forget your username ,try command “ls /home”)

passwd USER

7.If you are prompted with message like “password updated successfully” , you can reboot your computer by pressing Ctl+Alt+Del

Leave a Reply

Your email address will not be published. Required fields are marked *