How to enable root user in Kali 2020
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.
Kali will be running as user
Kali with password as
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
Try running the command
apt-get updatein terminal without the sudo command. It'll throw the following error since you do not have root permissions:
- Run the command
sudo dpkg-reconfigure kali-grant-rootin terminal to reconfigure password-less root rights.
- After clicking enter you'll see the following menu:
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:
Which means user
Kalihas 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-rootagain, it should show user
Kaliin trusted user group.
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
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!
- Now that you've changed the root password, logout as user
Kaliand login as user
rootwith the password you set in the previous step.
Congratulations! You're now logged in as root user.
You can verify by trying the
Let me know in the comments below which method worked for you.