This blog post will explain how to change default credentials in a Kali Linux virtual machine (VM) after spinning it from a 2020.3 OVA image1.
Since release 2020.1, Kali uses a non-root user policy by default. This means that the default credentials for a pre-created image are2:
- username:
kali
- password:
kali
Running a machine with default credentials is like leaving your house door unlocked at night in a bad neighborhood. Let me show you how to lock this door properly.
We will first change root and kali passwords, and then rename the default user together with its home directory and group.
Now change the password for kali too by typing passwd kali
. The process is the same as the one in the image above. Now log off and log in again as root.
Rename the default user with your username3:

Rename the home directory4:

I hope you liked this post. If you have any question, feel free to leave a comment in the comment section. Never stop learning!
- An OVA image is a copy of an existing virtual machine, that is, an archive file that contains metadata for the VM – such as name or hardware requirements – and at least one disk image, among other things.
- For more information see https://www.kali.org/docs/introduction/default-credentials/
- You might have to kill those processes that are using the user kali before renaming the default user.
- With -m, you copy all content from the older home directory into the new one.
Thank you so much. This blog page on changing default credentials in kali from terminal truly helped a lot.
Happy that this helped you!
This helped me so much! Thank you!!
Happy to hear that. You may find this blog entry interesting as well: http://3.65.220.238/2021/10/14/how-to-connect-to-an-ubuntu-vm-via-ssh-with-powershell/ . This is especially useful if you are using Ubuntu Server – which comes without a GUI – and want to avoid the pains of working on that terminal.
Thank you Michele
Great post. Symple and concrete.
Sweet, thank you so much!!!
Worked perfect for me.
Took a total of about 5 min. Thanks for the nice instructions.
That’s amazing! Thanks for sharing this.