After completing the installation of the Kali Linux machine the most highly performed task and asked question is to change the root password of your Kali Linux machine.
Note: This is not exclusive only just with Kali Linux machine, you can perform the steps in any Linux machine with grub, we are using Kali as an example.
The default credentials of logging into the new kali machine are username: “kali” and password: “kali”. Which opens a session as user “kali” and to access root you need to use this user password following “sudo”.
Changing the root password is easy, but you need to ensure these few things:
- You are using an active grub boot loader
- Your boot loader is not locked
If everything is okay then just follow the steps:
Step 1: Boot into your machine to grub menu, do not choose anything or boot into Kali.
Step 2: Now you need to edit the grub entries, so you can spawn a root session. Press “e” key to enter edit mode.
Now you need to find the keyword “linux”, in our case you can see that the last line starts with “linux”, which is kernel selection. In our case “/boot/v,linuz-220.127.116.11-kali2-amd64” represents our active kernel.
Navigate in the line to “ro” (read only) and replace it with “rw” (read and write).
In the same line navigate to “quite splash” and replace it with
These changes are not saved permanently and grub uses default configurations, once you have made these changes press key “f10” to boot. This will create a terminal session with root privileges
Step 3: Once you are in the terminal session you just need to enter the command:
After applying your new password reboot your system.
- Kali Linux - Password Cracking Tool
- How to Change the Mac Address in Kali Linux Using Macchanger?
- How to Change the username or userID in Kali Linux?
- Difference Between Arch Linux and Kali Linux
- Resetting a root password in Linux without external media
- How to reset the root password of RedHat/CentOS Linux
- Difference Between Ubuntu and Kali Linux
- How to Install Lazy Script in Kali Linux?
- Kali Linux Tools
- What is Vulnerability Scanning in Kali Linux?
- Introduction to Kali Linux
- How to Hack WPA/WPA2 WiFi Using Kali Linux?
- Kali Linux - File Management
- Kali Linux - Default Passwords
- Kali Linux - Crunch Utility
- How to Create Reverse Shells with Netcat in Kali Linux?
- Kali Linux - Terminal and Shell
- Kali Linux - Command Line Essentials
- Difference Between Fedora and Kali Linux
- Kali Linux - Exploitation Tools
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.