Hello everyone and welcome to
this lesson.
So here we are going to learn about how we
can break the root password.
Or maybe you come across a situation in
which you just forgot the password for
your computer.
And you need to log in.
Or for some reasons you are locked
out of your computer.
So in that case, how are you going to reset your
password or how you're going to break in and
reset the password and login into your computer?
So for that I'm just going to quickly restart my
Kali machine.
So this is my machine which has successfully restarted. I'll
hit enter and then wait for
this to.
start
so this is my Linux machine,
which has restarted. I'll hit enter and I'll
wait for this to go on to the login screen.
Alright, so I think now it is
going to boot up onto its login screen and I'm going
to show you that I will not log in with the
correct password, or maybe I've just forgot my
password for some reasons.
My username is root, but the password is incorrect.
So currently I'm typing in the password, which is ABCD
That is obviously incorrect password. So I'll
just copy that.
And I'll paste it over here and try to hit login
once more.
And you can see the password is incorrect. Now, you
may come across these situations in
life wherein you now need to
go into your machine, but you don't know the password.
So you're going to reset the password using a
technique?
So let's do this.
So for it you need to restart your computer.
Before restarting here are some steps to reset
the root password.
So the first is boot into the grub menu, so
this is basically nothing just do a restart.
And it will automatically pop up a grub menu, which
is Grand unified bootloader, which is nothing
just the screen which says you that you need
to start the Kali machine.
after that
You have to select the second option and you
need to press e which is you need to edit in
order to edit the boot entry as shown
below. So first, let's do this two steps.
So I'm going to restart the machine and wait for
my machine to boot up and as soon as we
see the grub menu.
We press e to edit the entry and
you can see clearly over here. It says gnu grub
version 2.04.
Here and you can also see that here.
There are certain characters and string
which are being written.
Alright, so now the next step
is to find the keyword, which is
Linux and search for r o
that is read only and replace that with
read and write.
So, let's see. Where is Linux and here it is Linux and we
can also see that it is written as r o which
is read only we need to modify that
to read right. This is done. Next step
is find quiet and replace within
it bin bash. So
Let's just do that. So here is quite
so let's just remove that and we're going to say in
it, which is initialize and we are
going to say
Equals to bin bash but in the
new version of Kali it has implemented zsh,
so I will just say instead of
bash this time.
bin slash zsh, which is the latest shell
Done. Now you need to click F10 which will
save these changes and give a restart to
our machine.
So let's wait for this to complete and now you
will come across screen on which
you need to see that do we
successfully have the read write
permissions or no? If we have that that
would be awesome and now we can reset the password
without logging in into the application.
So now we can reset the password without knowing
the correct password. So this is
the screen and now here we need to type Mount
so we need to type Mount command
to check if we have the read/write permissions. It
is granted or no so quickly type
Mo UNT and you'll see yeah, we have RW. That
is awesome.
Now we know we need to reset the password. So
the command would be passed WD and the
username that we want to reset for so it
is a root right now. So I'll choose a new password
which is root and again the same password which
is root.
And hit enter and you can see the password is updated successfully now
I need to restart so I will say execute has
been and initialize the
unlevel so it will automatically restart my computer and
now I should be able to reset the
password.
So I'll just copy ABCD.
And paste it over here. So the new password that I
set was ABCD not root. So the username
is root. The password is ABCD, which was not working before but
it has worked now which means we have
successfully logged in into a machine with resetting
the password from the grub menu. You
can check I'm the root user currently and we
have used the password ABCD by resetting it
from the grub menu.
I hope you guys understood this. Thank you.