How do I add a user in Kali Linux?

In any Linux distribution, including Kali Linux, manageing users is a fundamental system administration task. Multiple users on a system allow for personalised environments, tailored access rights, and increased security measures. Kali Linux, well known for its cybersecurity and penetration testing capabilities, provides powerful tools to add and manage users efficiently. In this comprehensive guide, we will delve into the process of adding a user in Kali Linux, exploring both the graphical user interface (GUI) and command-line interface (CLI) methods.

1. Understanding Users in Kali Linux

A user in Kali Linux is an account that grants access to the system’s resources. Each user has a unique username and password and can have specific permissions and ownership over files and directories. Traditionally, Kali Linux was known for running primarily under the ‘root’ account, providing unrestricted access to the system. However, from Kali Linux 2020.1 onwards, the default user is a standard, non-root user named ‘kali’.

Using non-root users for regular activities is a standard best practice in Linux, promoting better security by limiting access to critical system files and resources. Therefore, creating new users becomes essential when multiple people use the same system or when you need to manage diverse access permissions.

2. Adding a User in Kali Linux

Adding a new user in Kali Linux can be achieved through the GUI or CLI. Both methods are effective, and the choice depends on your comfort and familiarity with each approach.

2.1. Method 1: Using the Graphical User Interface (GUI)

For users who prefer a graphical interface, Kali Linux, with its GNOME desktop environment, provides a simple and intuitive way to add users. Here are the steps:

  1. Open the “Settings” window by clicking on the downward-facing arrow in the top-right corner of the screen and selecting the wrench-and-screwdriver icon.
  2. In the “Settings” window, click on the “Users” tab on the left sidebar.
  3. Click on the “Unlock” button in the top-right corner of the “Users” screen and authenticate with your password to make changes.
  4. Click on the “+” button at the bottom-left of the “Users” screen.
  5. In the “Add User” dialogue box that appears, fill in the “Full Name” and “Username”. The username should be in lowercase and without spaces.
  6. Select the “Account Type” for the new user. A “Standard” account has limited access, while an “Administrator” account can perform tasks that affect the whole system.
  7. Click on the “Set a password now” option and fill in the “Password” and “Confirm Password” fields.
  8. Finally, click on the “Add” button to create a new user.

2.2. Method 2: Using the Command-Line Interface (CLI)

For users who prefer using the command line or are working with a headless or remote system, you can add users in Kali Linux using the adduser command. Here’s how:

  1. Open a terminal in Kali Linux. You can do this by pressing Ctrl + Alt + T or searching for “Terminal” in the application menu.
  2. Enter the following command to create a new user (replace username with the desired username): sudo adduser username
  3. After executing the command, you will be prompted to set a password for the new user. Enter a strong password and confirm it by reentering it when prompted.
  4. You will then be asked for additional information about the user, such as Full Name, Room Number, Work Phone, Home Phone, and Others. These are optional and can be skipped by pressing Enter.
  5. Finally, you will be asked to confirm the information. Press Y and then Enter to confirm and create the new user.

3. Configuring User Permissions

Once a user is added, you may need to configure the user’s permissions depending on their role. User permissions in Kali Linux (and other Linux distributions) are managed through “user groups.”

To add the new user to a group (e.g., sudo group to allow administrative privileges), use the usermod command as follows:

sudo usermod -a -G groupname username

Replace groupname with the desired group (such as sudo) and username with the username of the new user. The -a option ensures the user is appended to the group, and -G specifies the group.

4. Conclusion

Managing users, including adding new users, is an integral part of Kali Linux system administration. Whether you prefer the GUI method or the CLI method, Kali Linux provides a straightforward and efficient way to add users. In addition, understanding how to add users helps enhance the system’s security by ensuring appropriate access levels for different users.

When adding new users to your Kali Linux system, always consider the principle of least privilege, which suggests that a user should have only the bare minimum privileges necessary to complete their tasks. This approach helps minimise potential damage if a user’s account is compromised.

Remember, Kali Linux is a powerful system with robust tools. Whether you’re using it for penetration testing, cybersecurity research, or general computing, it’s essential to maintain responsible user management practices to ensure the system’s security and efficiency.

Scroll to Top