Using Root in Kali 2020

by | Mar 5, 2020 | Uncategorized | 0 comments

Print PDF

Submit your email address to access the PDF of this post.
  • This field is for validation purposes and should be left unchanged.

Kali linux has undergone many changes over the past year. With a new UI, transitioning to python3, and a host of new tools, 2019 was a big year for the Kali Linux team. Now, after some telling blog posts, the Kali team has made even more changes to the distribution for the 2020.1 build. The greatest change with the latest release is the removal of the root user as the default account, which is consistent with most modern Linux distributions.

However, you may be saying to yourself “Thanks for the changes Kali developers! But I’ll have my root account back now please.” This is, of course, possible, and quite easy, with a couple changes, and one large caveat.

Warning!

There are inherent risks in using the root account, hence why the Kali team opted to go with most of the rest of the Linux community and use the non-privileged account. If you understand the risks associated and still want root, proceed.

Method 1: Password Change for Root and Simple Bashrc Update for Colors!

First, since the newest distribution of Kali Linux changed the installer to require creation of a non-privileged account. You can create this as whatever you want.

After completing this, most of the steps are similar to the way Kali has been built before. However, Kali will ask you now about optional settings you may want. You can install default tools, more tools, or less tools if you like. You can also pick your desktop environment in the installer, instead of having to work from a desktop environment-based ISO.

After this, Kali will begin to update files through the installer (goodbye apt update && apt upgrade the moment you turn the system on!) and you should soon be on your way to your new Kali desktop environment!

When you log in, you will want to change the password of your root account, so you can access it. As shown below, you will need to sudo your command as a low privileged user in order to do this.

Upon changing the password here, you can log out as your low privileged user, and log in as root. However, you will notice that none of your bash output in terminal is colored. This is by design for the current version of Kali. Yet, if you are one of those who want to use root on a daily basis, you only need to make changes to root’s bashrc file and then source it to affect the change. As root, use a text editor of your choice to edit the .bashrc file located in your root directory.

You will then see this output:

You will want to uncomment the following lines in order to colorize the terminal output for root:

When finished, hit escape, which will take you out of standard input, and type “:wq!” (without quotes) which issues the command to write changes, quit, and don’t ask if it’s alright to do so.

You won’t immediately notice a change for root. In order to finalize the changes for the current session, you will need to either log out and back in, or simply source your bashrc file again.

After sourcing your bashrc file, you are now done and have a simplified pre-Kali 2020.1 root experience.

Method 2: Script it Out and Update all Files Needed at Once for the Full Experience!

Happy hunting Kali users!