Kali Linux

How to Change Admin Password Kali Linux

Passwords are the must-haves when it comes to security and privacy of user accounts for a type of operating system (i.e., Windows or Linux.) Everybody uses a password to secure their devices and the data in them to avoid suspicious attacks and unauthorized logins. Just like this, two types of users can be created in the Linux and Windows operating systems (i.e., admin or root, and standard.)

According to their types, the privileges assigned to them are also different and have different impacts. Admin and root user accounts are said to be the managers of the whole system. Thus, we will be take a look at the ways to change the password for an admin account in a Kali Linux operating system installed on Windows 10.

Change Password for Currently Logged in Admin:

Let’s start with the opening of a Kali Linux application from our Windows 10 system, search “Kali Linux” from your search bar of the Windows 10 operating system. The application will appear in your system’s application area. Run it as administrator by tapping on the option of “Run as administrator”.

The black screen will be opened on your screen, and it will take for a while for some content to appear. The below-shown Console Interface of Kali Linux will appear, and you can add as many commands as you want to it. It automatically logged in from the only user account it has (i.e., “Test” with sudo rights except “root”.) This is why it doesn’t require a password to start it. But it does have a password.

If you need to change the password of this admin account named “Test”, you can do so by using the simple “passwd” command on the currently opened console. It will then allow the user to enter the existing admin account password. You will be capable of setting a new password for it after safely integrating the current password.

You need to add a new password twice for confirming. Your admin account “test” password will be updated successfully on your Linux machine. Try the new password while using some commands in the shell next time.

Let’s say, you want to add a new user named “Peter” by using the “Test” admin on the Kali Linux shell, You need to use the “useradd” instruction with the “-m” option followed by a new username i.e. “Peter”. It requires your newly changed password for “Test” admin to continue.

A new user “Peter” will be added to your Kali Linux system, but it will not be an admin account. You need to set the password for this standard user “Peter” using the passwd command as shown below. The password for the standard user “Peter” has been set.

To log in from the standard account “Peter”, you need to try the “su Peter” instruction on the console of the currently logged in Admin account (i.e., “test”.) To log in, it will prompt for the password of user “Peter.”

After adding its password, the console for the “Peter” standard account will be launched. The console will be simpler than the “Test” user console. When you try to update the Kali Linux system with the “apt-get” instruction, it will not allow you to do so. This is because of the type of “Peter” account i.e., not an admin account.

Thus, you need to make it a sudo user. Login from the “test” user again using the “su” query. Use the “usermod” instruction with “-a”, “-G” options followed by the keyword “sudo” for the “Peter” account. To proceed, it will request the password for the “Test” admin account.

After this, use the “chsh” instruction followed by the “-s” flag and path to the “bash” folder of the “Peter” account. Now, your account “Peter” is set to “admin” or “sudo”.

Login from it by using the “su Peter” instruction followed by the password. You would be effectively logged in, and the console will appear, similar to the “test” account. Try out the update instruction in its console and it will be executed successfully this time.

This is about changing the password for the currently logged-in account and updating the type of a standard user to a sudo user by using the “usermod” instruction.

Change Password for Root User:

When you install Kali Linux on your Windows 10 system using the WSL tool, the “root” user account gets created automatically without a password. While it asks you to add a new user with its password like “test”.

So, currently, the “root” account has no password, and we will be changing it. Before that, use the “su” instruction to log in from the root using the current account “test” console. Add a password for admin “test” and you will be logged in from the “root” user in red. Use the “passwd” command to create its new password and retype it.


This article demonstrates the importance of passwords in our daily life while using different devices and operating systems. We have seen simple commands to change the password for the kali Linux admin user and use this new password to execute some needed queries i.e., create a new account and more. At last, we have also demonstrated to create a password for the Kali Linux “root” user using the same “passwd” instruction. This is all about the use of passwd instruction on the Kali Linux console to change the password for the admin account.

About the author

Kalsoom Bibi

Hello, I am a freelance writer and usually write for Linux and other technology related content