How to reset Kali linux root password

I have set a root password when installing the Kali linux and now I have forgotten it.I even don't remember my user name.I have searched through the internet and I have found a method that includes editing the GRUB menu, which doesn't seem to work with the Kali linux version that I have now.What do I do to reset my root password?


Assuming you are using Kali Linux 1.0, Press "e" to edit Grub Menu. Find the line starting with "linux". Change the "ro" with "rw" and add "init=/bin/bash" after "quiet". Press F10. You will get "root" console. Type and enter "passwd" to change root password. You should be good.

enter image description here


Well I think there is a way taking it back if your user have sudo prvilage and you find out that username?

well let go through it... first you must find a live OS. you can use Kali in live mode , Ubuntu in live mode or whatever.

mount the hard disk that has Kali or the root of your Kali OS. find /etc/passwd and open it... you might find the username you set inside it. something like this: user:x:1000:1000:USER,,,:/home/user:/bin/bash

that's your username.
Hopefuly you know that username pass else you are screwed. if you have the pass you can login to kali with your own username.
to change root. you must use this command:
sudo su -
prompts your username's password. now you have access to root!!! change your root pass by passwd