how to add user on kali linux

How to Add a New User in Kali Linux (GUI & Command Line)

Oddly enough, Kali Linux is a security-oriented distribution, but it comes with a default login and password. You will need to harden it a bit after the initial installation. You can always change the password or even set a different user name. But it’s also possible to create a new one. Here is how to do it.

On Kali Linux, the easiest way to create a new user is to use the system settings panel. It’s also possible to do the same using Linux commands from a terminal (locally or remotely).

In this tutorial, I’ll discuss these two options, starting with the simplest one (via the GUI) and then give you the commands lines to do the same from a Linux prompt.

Master Linux Commands
Your essential Linux handbook
Want to level up your Linux skills? Here is the perfect solution to become efficient on Linux. 20% off today!

Download now

How to add user on Kali Linux via the GUI

Hide your IP address and location with a free VPN:
Try it for free now, with advanced security features.
2900+ servers in 65 countries. It's free. Forever.

If you have access to the desktop environment, Kali Linux includes a tool to manage users easily from the system settings.

Here is how to create a new user from the graphical interface:

  • In the main menu, click on “Settings” > “Settings Manager”.
  • Find the “Users and Groups” item in the settings:
  • By clicking on it, you’ll see your current users (probably only the main user).
    But there, you can click on “Add” to create a new user:
    You may need to enter your password to access this screen.
  • Fill the form with the new user name and username, and click on “OK”.
    On the next screen, you can set the initial password for the new user (or generate a random one):
  • Click “OK” again and the new user will be created.

You can log out from your current account and try the new one right away if you want, it should work directly.

Your Go-To Linux Command Reference!
Download your exclusive free PDF containing the most useful Linux commands to elevate your skills!

You can even delete the main account after that if that was the goal (using the same settings menu), but before doing that, make sure the new user has all the permissions you need, and that you copied the personnel files (from your home directory to the new user directory).

For example, with the default settings, the new user can’t use sudo, so you’ll quickly get stuck. I’d recommend keeping both users for a while, using only the new one, to make sure you don’t forget anything.

How to add user on Kali with Linux commands

Creating a user in command lines on Kali Linux is not that complicated, you basically need only one command to do it.

Here is how to create a new user on Kali Linux from a terminal:

  • Open a terminal or an SSH connection.
  • Type the following command:
    sudo adduser <new-username>
    Replace the variable with the user you want to create, for example:
    sudo adduser infosecscout
  • The wizard will ask a few questions to customize the user.
    Except for the passwords, you can keep the default values for most of them (just press ENTER).

That’s all you need to know for a basic user with no additional permissions. After doing this, you can log in right away:

Now, as for the user creation from the GUI, you’ll quickly see that the new user has basically no permissions at this point, so make sure to read the next section if you need administrative privileges for this user.

Related questions

How to add “sudo” permission to a new user?

On Kali Linux, users must be members of the “sudo” group to get access to the sudo command line, which gives them administrative privileges. The “adduser” command can again be used to do this.

By default, the new user can’t use sudo, and will typicall get an error:

<username> is not in the sudoers file.

Your Go-To Linux Command Reference!
Download your exclusive free PDF containing the most useful Linux commands to elevate your skills!

The error message is not very clear on how to fix it, but on Kali Linux is pretty straightforward, the only thing you need is to add the new user to the “sudo” group.

Make sure you’re still logged in with the main user (not the new one), and follow this command syntax:
sudo adduser <username> sudo

So, with my previous example, it would be:
sudo adduser infosecscout sudo
Obviously, this must be done by a user with administrative privileges.

Become a Cyber Security Expert!:
Enroll in the Complete Cyber Security Course now, and master online safety.
Learn to defeat hackers, protect privacy, and stay anonymous with over 50 hours of on-demand video.

Once done, logout from your main user session, and try again from the new user session.
It should be fine after that:

If you have access to the GUI, you can even do it from the system settings, check the next question for more details.

How to add a new user to a specific group?

On Kali Linux users can be added to a group either by using the adduser command (sudo adduser <user> <group>), or via the “Users & groups” settings from the GUI.

I showed you how to do it in command lines in the previous question (you can replace “sudo” with any other group), but the easiest way on Kali is probably to use the GUI:

  • Open the system settings, and find the “Users and groups” item.
  • Under the list of users, click on “Manage groups”:
  • A list with all the system groups shows up, find the group you want to edit (“sudo” for example), and select it.
  • Then click on “Properties” to see the groups members:
  • In the new window, you’ll see the group name, id and members.
    You can simply check/uncheck any user to add or remove them from the group.

I wish it was this easy in other distributions, but anyway, creating a new user and managing its permissions is not that complicated in Kali Linux, and now you know how to do it in two different ways :-).

Whenever you’re ready for more security, here are things you should think about:

- Break free from Gmail: You should be able to choose what happens to your data. With Proton, only you can read your emails. Get private email.

- Protect yourself online: Use a high-speed Swiss VPN that safeguards your privacy. Open-source, no activity logs. Get Proton VPN risk-free.

- Master Linux commands: A sure method to learn (and remember) Linux commands. Useful ones only, one at a time, with clear explanations. Download the e-book.

Similar Posts