To set the root password and enable root login, follow these steps:
1. Open the terminal window by pressing ‘ctrl + alt + t’ at the same time on your keyboard.
2. Update your local package repository and install the “kali-root-login” package.
sudo apt update
sudo apt install kali-root-login -y
*When prompted for a password, enter the password for your current user (for example, “farhan” in my case).
3. Next, set the root password using the command ‘sudo passwd root‘. You will be prompted to enter and confirm your new root password.
Note: for security reasons, the characters you type will not be visible on the screen.
sudo passwd root
4. Restart, log out, or switch users to return to the login screen.
5. In the username field, type “root”, and in the password field, type the password you just set.
That’s it! Your root user account is now enabled, and you can log in to the GUI as the root user.
By following these steps, you have successfully set the root password and enabled root login on Kali Linux.