How to Give a Kali Linux User Sudo Access

To give a Kali Linux user administrative access, add that account to the sudo group instead of enabling a direct root login. The user can then run a single administrative command with sudo and keep ordinary terminal work under an unprivileged account.

I checked Kali’s current sudo documentation while updating these commands, which describes sudo as the standard route for administrative work and documents a separate kali-grant-root package only for a passwordless trusted-group setup.

Choose sudo access instead of a root login

Root can change every file, service, and account on the machine. A sudo-enabled user gets that authority only for commands that need it, which keeps the normal shell session away from system-wide changes.

Use a direct root shell only when a task requires several related administrative commands, while routine package management, service control, and file ownership changes should use sudo for the specific command.

Add an existing Kali user to the sudo group

Sign in with an account that already has sudo access, then replace username with the account you want to authorize. Kali uses Debian-style group administration, so this command adds the account to the sudo group without removing its existing supplementary groups.

sudo adduser username sudo

The first retained terminal capture shows the account-creation flow from the earlier walkthrough. If the account already exists, do not create it again. Add it to sudo and continue with the verification command below.

Terminal prompt while preparing a Kali Linux user account

The account setup prompts establish its password and profile details. Keep the password private and use a separate account for each person who needs administrative access.

You can also use usermod when the account already exists. The -aG flags append sudo to the supplementary-group list. Omitting -a can replace the existing list, so keep both flags together.

sudo usermod -aG sudo username

For a fuller explanation of users, primary groups, and supplementary groups, see managing Linux users, groups, and permissions. The user’s next login starts a session with the changed group membership.

Terminal output from adding a Kali Linux user

This retained output illustrates the interactive account setup. The command in this section is the authority change. It belongs to an existing sudo administrator, not to the user who is waiting for access.

Start a fresh login before testing sudo

Supplementary groups are loaded when a session begins, so sign out and sign in again, or start a fresh login shell with the account, before treating the group update as active.

su - username

Then list the commands sudo permits for that account. The result confirms the sudoers policy without changing a file or service.

sudo -l -U username
Terminal output after adding a user to an administrative group

The retained group-membership output is the check to make after a new session begins. If sudo -l reports that the account is not allowed to run sudo, confirm the spelling of the account and inspect the sudo group with getent group sudo.

Use a root shell only when you need it

A root shell is useful for a short sequence of related maintenance commands, but it removes the per-command pause that sudo provides. Kali’s root documentation explains how to set a root password when that access is required.

sudo passwd root

That command changes the root password. It does not give another user sudo access. Keep root authentication disabled for remote services unless you have an explicit access-control requirement and have configured those services accordingly.

Terminal command for installing Kali grant root support

The retained kali-grant-root capture relates to a narrower setup. Kali documents the package for adding a user to a trusted group that can run sudo without entering a password, which is not the normal sudo-group configuration.

Passwordless sudo reduces a protection step for every permitted command. Use it only for a deliberately controlled account, and review Kali’s current sudo documentation before creating a trusted group.

Check the account and sudo configuration

  1. Confirm that the account exists with id username.
  2. Confirm that sudo appears in its groups with id username or getent group sudo.
  3. Start a new login session before testing the permission.
  4. Run sudo -l -U username from an administrator account and read the listed policy.

File permissions are a separate control from sudo membership. When a command fails because a file is not writable, inspect the ownership and mode before granting broader access. Use chmod and chown deliberately to change those file-level rules.

Terminal output related to Kali root access configuration

This retained terminal state belongs to the optional root-access path. Use it as a reminder that root credentials and a user’s sudo authorization solve different problems.

Where to go next in Kali Linux

Administrative access is safer when you know which command changes which part of the system. Build that foundation with the Linux command line, then use the Kali Linux commands reference for Kali-specific terminal work.

If you are preparing a disposable lab before changing user permissions, install Kali Linux in VirtualBox first. A virtual machine lets you practice group and sudo changes without altering your main system.

Terminal view of a Kali Linux root privilege workflow

The retained terminal capture marks the end of the privilege workflow. Close the elevated shell when the administrative task is complete, then return to the regular user account.

Remove sudo access when it is no longer needed

Remove an account from the sudo group with deluser when its administrative role ends. Ask the user to sign in again after the change so the old group membership is no longer active in a new session.

sudo deluser username sudo
Terminal command for removing a Kali Linux user account

The retained removal capture shows the older account-management workflow. Removing a user account and removing sudo access are separate operations. Remove the sudo group first when you only need to withdraw administrative permission.

How do I give a Kali Linux user root privileges?

Add the account to the sudo group with sudo adduser username sudo, then start a new login session before testing its sudo policy.

Should I enable the root account in Kali Linux?

Use a sudo-enabled account for normal administration. Set a root password only when a task needs a root shell and protect remote root access with explicit service configuration.

How do I remove sudo access from a Kali Linux user?

Run sudo deluser username sudo, then have the user begin a new login session so the changed group membership applies.

Add only the accounts that need administrative commands, test the policy from a fresh login, and remove sudo membership when the role changes.