How To Login As Root In Kali Linux

Today we will touch upon the vital topic of working with root user rights in Kali Linux 2021. One of the innovations of this version is the no-root access. Those. by default, after installation or on a ready-made virtual machine, you work from under the usual mortal user. This is purely for security reasons.

After all, if you use Kali Linux as the main desktop os, constantly surf in the dark and occasionally play around with pentesting tools, the likelihood of one day becoming a victim yourself increases significantly.

However, if you run it occasionally, use it solely for educational purposes and isolate it from the main network, minimizing the vulnerability of the system as much as possible, it will be much more convenient for you to immediately work as root.

At a minimum, this will save you from the endless problems of forgetting to enter “sudo” before the next command, and at the most, it will help you not to bother with the lack of the necessary rights when installing a particular package. (Source: kalituts)

Today, I will show you a few options, by exploring which, you can improve your efficiency with the Kali Linux system and get the coveted root rights. Make yourself comfortable and drove kinky.

Step 1 If you do not understand what it is about from the preface, I will show it in practice. We enter the command familiar to all Linux users to update the list of packages apt-get update and see the “permission denied” error, which means the lack of appropriate rights.

kali Linux Permission denied

Step 2 And now we repeat the command by entering “sudo” before the body. The update started immediately. This is because the sudo prefix allows us to execute any command with unlimited super-user rights.

kali Linux super-user rights

Step 3. And our current one, unfortunately, is not. You can verify this by entering id. You see, uid is a thousand. This tells us that we are using the most common user.

kali linux default login

Step 4. In order to work in a terminal window with root rights, just enter a simple command “sudo su”.

kali linux give user root privileges

Step 5. Let’s now check the uid. It dropped to zero, and therefore we are working a hundred pounds with unlimited rights. The username, as you can see, has also changed.

kali linux root password

Step 6. However, agree that in terms of security, this method of switching to root is quite clumsy. Let’s at least, for decency, set a password. Sudo passwd. And twice we enter a complex password. Okay. Now let’s close the terminal window.

sudo passwd

Step 7. And after opening a new one, enter su. The system asks for the password we just set for the root user. We enter it.

su root

Step 8. Let’s try now to update the package list without first entering sudo. So. Everything works. In principle, working in this mode is the safest for those who use Kali as their main OS. But if you rarely use it and are interested in saving time, you can immediately burst under the root. Let’s try this. We exit the system.

kali Linux root login

Step 9. And enter the superuser login and password set earlier. “Log In”.

root toor

Step 10. After entering, we call the terminal window and make sure that we are using root account.

How to get root access kali Linux

Thus, you can now really save your precious time by entering all the commands without the burdensome sudo prefix. Working right away with full rights is much more pleasant.

And practically, and just morally. In general, until 2020, a Root user was always initially created in Kali, and the above dances with a tambourine are downright know-how from the developers.

That’s all for me. Today the lesson is not so long .

Happy learning!


Here’s an easier way

sudo pswd

You’ll be asked to enter a pass of your choice

Make your Pass
after that sign-out or restart your machine and add these fields

Username - root
Password - the password you made after typing sudo pswd