How to enable root user in Kali 2020

non-root-default-kali-user.png Photo from Kali.org

So you’ve installed Kali because you’re interested in Ethical Hacking. Maybe you’re just trying a new flavor of Linux. If you’ve used Kali before you’ll notice that when you enter root as username and toor as password, it no longer accepts those credentials.

kalirootlogin.PNG

Kali will be running as user Kali with password as Kali.

From 2020.1 version, Kali Linux moved to default non-root user. This doesn’t mean that there is no root user or the password toor is incorrect. It's just that there is no default password set for root user.

What does this mean and what are some ways around it?

In the earlier days, many applications on Kali needed root user permission to run. Think of this like having to "Run as Administrator" while using Windows. As time passed and Kali grew, a lot of users started using Kali as their primary OS. And when they do so they don't run as root user by default. So Kali concluded there is no need for a default root user and dropped it.

This article talks more in detail about their reasoning behind this decision and next steps.

According to Kali, you can do the following if you would like to go back to the default root user mode:

  • Login to Kali as user Kali [username Kali and password Kali]. kalilogin.jpg

  • Try running the command apt-get update in terminal without the sudo command. It'll throw the following error since you do not have root permissions:

kaliapt.PNG

  • Run the command sudo dpkg-reconfigure kali-grant-root in terminal to reconfigure password-less root rights.

kalisudo.PNG

  • After clicking enter you'll see the following menu:

kalipackagebefore.PNG

Notice user Kali is not part of the trusted group, We need to add Kali to the trusted group.

  • Click on Enable password-less privilege escalation

You should see the following commands:

kaliaddedtrusted.PNG

  • Which means user Kali has now been added to trusted user group and thus shall not require password to access root rights.

  • If you run the command sudo dpkg-reconfigure kali-grant-root again, it should show user Kaliin trusted user group.

kalipackage.PNG

This however did not work for me for some reason.

I decided to change the password of root instead, and that worked!

Steps to change the root password.

  • Open Terminal and type the command sudo su sudo su.PNG

  • Then type in the command passwd root. This is the command to reset root password. Type in the new password and the password will be changed successfully!

passwdroot.PNG

  • Now that you've changed the root password, logout as user Kali and login as user root with the password you set in the previous step.

Congratulations! You're now logged in as root user.

You can verify by trying the apt-get updatecommand.

kalirootupdate.PNG

Let me know in the comments below which method worked for you.

No Comments Yet