Add the user to the sudo group with:

adduser <username> sudo

(If you're running Ubuntu 11.10 or earlier, use the admin group.)

Default values are stored in /etc/adduser.conf, you can check them with

less /etc/adduser.conf

To create a user and add it directly to the sudo group use

adduser <username> --group sudo

(Again, use admin in place of sudo for 11.10 and earlier.)

Have a look at all the options you have with adduser here.

Answer from Bruno Pereira on askubuntu.com
๐ŸŒ
nixCraft
cyberciti.biz โ€บ nixcraft โ€บ howto โ€บ linux โ€บ add a new user account with admin access on linux
Add a new user account with admin access on Linux - nixCraft
December 26, 2024 - Commands to add or create a new ... sudo. To become the root user, type sudo -i ยท Create a new user named marlena, run: adduser marlena ยท Make marlena user โ€˜sudo userโ€™ (admin) run: usermod -aG sudo marlena...
Discussions

Linux asks me to make the first user as admin during the installation
I am newbie to Linux OS. I followed an online tutorial on how to setup RedHat for the first time. The instructor asks me to tick the option of make the first user as admin because it will be difficult to do that later. Does that mean I have two admin users, which are the root and user1? More on community.spiceworks.com
๐ŸŒ community.spiceworks.com
15
4
January 1, 2022
How do I create a user with admin privileges?
Didn't root user already exists after installation? Anyway to give "admin rights" you need to use sudo. Log into the root user and use visudo to edit the sudo config file. I would recommend you to watch a tutorial on how it works, there are plenty on YouTube. More on reddit.com
๐ŸŒ r/Kalilinux
15
0
August 9, 2022
Standard user or admin for daily use
The "admin" account's username is root - you create a username like mostie - and use that. ONLY use root when you must. Normally, you can use sudo before your command to run that particular command as root instead of logging as root and then running the command. Only noobs who are complete Johnsons try and run everything as root ("because it is easier" / "because it is my computer" / "I need duh powr!") They also try to save themselves from learning anything about security by using the commands chown -R me:me * and chmod -R 777 * thinking that it will be "the answer" to their poor understanding of things - and get themselves into all sorts of kerfuffle.... Don't do it! More on reddit.com
๐ŸŒ r/linux4noobs
6
10
November 25, 2020
How do I run something as an administrator on linux
Just so you know, running something as root on Linux is not the same as running something as Administrator on Windows (e.g., giving higher CPU priority to applications that are run.) Go with the first comment and learn how to use 'nice' and 'renice' to give an application priority. More on reddit.com
๐ŸŒ r/Ubuntu
8
4
November 13, 2020
People also ask

How do I delete a user in Linux?
Use the `userdel` command. To also remove the home directory, add the `-r` flag: `sudo userdel -r username`. See the userdel guide for details.
๐ŸŒ
linuxize.com
linuxize.com โ€บ home โ€บ linux commands โ€บ how to create users in linux (useradd command)
How to Create Users in Linux (useradd Command) | Linuxize
How do I create a user with a home directory in Linux?
Use the `-m` flag: `sudo useradd -m username`. This creates the home directory at `/home/username` and copies default files from `/etc/skel`.
๐ŸŒ
linuxize.com
linuxize.com โ€บ home โ€บ linux commands โ€บ how to create users in linux (useradd command)
How to Create Users in Linux (useradd Command) | Linuxize
What is the difference between `useradd` and `adduser`?
`useradd` is a low-level binary available on all Linux distributions. `adduser` is a higher-level, interactive script available on Debian-based systems (Ubuntu, Debian) that calls `useradd` internally and automatically sets a password, creates the home directory, and prompts for user details.
๐ŸŒ
linuxize.com
linuxize.com โ€บ home โ€บ linux commands โ€บ how to create users in linux (useradd command)
How to Create Users in Linux (useradd Command) | Linuxize
๐ŸŒ
VITUX
vitux.com โ€บ how-to-make-a-user-an-administrator-in-ubuntu
How to Make a User an Administrator in Ubuntu โ€“ VITUX
However, if you want to grant administrative privileges to a user, this article is for you. In this article, I describe how to make a user an administrator through the graphical user interface and explain what commands you need to use on the command line to add a user to the sudo (authorized) user group.
Top answer
1 of 3
9

You do not want to make this user EXACTLY the same as root. Don't change uid and gid. You have a few options:

  • Use sudo. sudo lets a user execute a command or start a shell as root, without needing the root password. However, the admin of the computer can tightly control which commands a user can "sudo". Read up the man page. But if you want an easy "let this user run any thing with sudo", put this user in the /etc/sudoers file. Even better, put this user in the admin group then add the line %admin ALL=(ALL) ALL to /etc/sudoers. On Ubuntu, this is probably your best option as sudo is installed by default.

  • Put this user in the wheel or admin group. This user won't be root, but will have the same access to files as everyone else in wheel or admin.

  • Give the user the root password and make this user use su <cmd>. This is a bad idea. On recent versions of Ubuntu, the root account can't login by default so you can't do this.

2 of 3
8

Your best bet under ubuntu is to add the person to the sudoers file. You should use visudo to edit this file. If you hate vi, you can set the EDITOR shell variable to use your preferred editor.

You have many choices when adding a peson as a sudoer. You don't have to give them blanket root access if you don't want to. In general the lines in /etc/sudoers looks like:

 usernames/group servername = (usernames command can be run as) command

There are some general guidelines when editing this file:

  • Groups are the same as user groups and are differentiated from regular users by a % at the beginning. The Linux user group "users" would be represented by %users.
  • You can have multiple usernames per line separated by commas.
  • Multiple commands also can be separated by commas. Spaces are considered part of the command.
  • The keyword ALL can mean all usernames, groups, commands and servers.
  • If you run out of space on a line, you can end it with a back slash () and continue on the next line.
  • sudo assumes that the sudoers file will be used network wide, and therefore offers the option to specify the names of servers which will be using it in the servername position in Table 9-1. In most cases, the file is used by only one server and the keyword ALL suffices for the server name.
  • The NOPASSWD keyword provides access without prompting for your password.

You can use /etc/sudoers to grant specific access to specifc people for any or all applications.

This site includes some decent examples.

๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ linux-unix โ€บ how-to-grant-admin-privileges-to-a-user-in-linux
How to Grant Admin Privileges to a User in Linux - GeeksforGeeks
July 23, 2025 - Linux is an operating system that is open source operating system. There are many distros available in Linux distribution like Ubuntu, Kali Linux, Arch Linux, and Red Hat Linux. In this article, we will understand how to give admin privileges to non-admin users in the Ubuntu Operating system.
๐ŸŒ
TechRepublic
techrepublic.com โ€บ home โ€บ security
How to create a new user with admin privileges on Linux - TechRepublic
November 2, 2022 - Problem is, when you create a new user, that user doesnโ€™t have admin privileges. What do you do? Let me show you. In fact, Iโ€™m going to walk you through the process of creating an admin-ready user on Linux with just a few quick commands.
Find elsewhere
๐ŸŒ
MakeUseOf
makeuseof.com โ€บ home โ€บ linux โ€บ how to grant admin privileges to a user in linux
How to Grant Admin Privileges to a User in Linux
March 14, 2021 - After launching the tool, look ... the sudo or sudoers group. Two different commands can grant admin rights in Ubuntu: usermod and gpasswd....
๐ŸŒ
Linuxize
linuxize.com โ€บ home โ€บ linux commands โ€บ how to create users in linux (useradd command)
How to Create Users in Linux (useradd Command) | Linuxize
March 10, 2026 - Learn how to create and add users in Linux with the useradd command, including home directories, passwords, groups, shells, UIDs, and other common account โ€ฆ
๐ŸŒ
NinjaOne
ninjaone.com โ€บ home โ€บ script hub โ€บ complete script guide: creating new admin users in linux
Create Admin User in Linux | Script | NinjaOne
September 2, 2025 - Explore our in-depth guide to create admin users in Linux using a specialized script. Ideal for IT pros and MSPs seeking efficient user management solutions.
๐ŸŒ
Ubuntu Community
help.ubuntu.com โ€บ stable โ€บ ubuntu-help โ€บ user-admin-change.html
Change who has administrative privileges
Open the Activities overview and start typing System. Select Settings โ–ธ System from the results. This will open the System panel. Select Users to open the panel. Press Unlock in the top right corner and type in your password when prompted. Under Other Users, select the user whose privileges ...
๐ŸŒ
Linux Security
linuxsecurity.com โ€บ howtos โ€บ learn-tips-and-tricks โ€บ how-to-create-a-new-user-with-admin-privileges-on-linux
Easily Create an Admin User on Linux: A Step-by-Step Guide
October 23, 2020 - In this tutorial, Jack Wallen demonstrates how to easily add a new user with admin privileges on Linux. If you're a Linux system admin, you probably find yourself scrambling to keep everything in check every day. There's a lot to be done and doing this with a nod to security makes the task ...
๐ŸŒ
VITUX
vitux.com โ€บ how-to-make-a-user-an-administrator-in-debian
How to Make a User an Administrator in Debian 11 โ€“ VITUX
June 10, 2022 - In the following method, we will make a user an administrator though the Settings utility. To open the settings utility in your Debian system, hit the super key on your keyboard and type users. You will see the Settings icon in the results as shown in the following screenshot.
๐ŸŒ
StrongDM
strongdm.com โ€บ blog โ€บ security
How to Create Users in Linux with useradd (Step-by-Step)
February 24, 2025 - Start by opening your command-line interface, or terminal, in Linux. The quickest way to do this is to use the following keyboard shortcut: Ctrl-Alt-T. You'll need to have root or sudo privileges to create new users.
๐ŸŒ
LinuxVox
linuxvox.com โ€บ blog โ€บ linux-make-user-admin
Linux: Making a User an Administrator โ€” linuxvox.com
Users who are members of the sudo group can use the sudo command to gain administrative privileges. The most common way to make a user an administrator is by adding them to the sudo group.
๐ŸŒ
CIQ
ciq.com โ€บ home โ€บ blog โ€บ how to give rocky linux users admin rights
CIQ | How to Give Rocky Linux Users Admin Rights | Blog
August 25, 2023 - Don't log in as root but as the user you created during the installation of Rocky Linux. Generally speaking, logging in as the root user is frowned upon as a security risk Let's create the user olivia with the command: ... The above command will create the user olivia with the home directory of /home/olivia but will not ask you to set a password. For that, use the command: ... You'll be prompted to type and verify a password for the user. Just for fun, let's test the admin privileges for the new user.
๐ŸŒ
Reddit
reddit.com โ€บ r/kalilinux โ€บ how do i create a user with admin privileges?
How do I create a user with admin privileges? : r/Kalilinux
August 9, 2022 - Anyway to give "admin rights" you need to use sudo. Log into the root user and use visudo to edit the sudo config file.
Top answer
1 of 6
91

First, create the user with:

sudo adduser <username>

You can read more about this command in the man pages of your system with man adduser.

You can then add a user to the sudo group with with the command:

sudo adduser <username> sudo

Note that versions of Ubuntu until 11.10 will use admin as group instead of sudo:

Until Ubuntu 11.10, the Unix group for administrators with root privileges through sudo had been admin. Starting with Ubuntu 12.04 LTS, it is now sudo, for compatibility with Debian and sudo itself. However, for backwards compatibility, admin group members are still recognized as administrators


If your system does not, then we need to mess with the sudoers file to grant sudo permissions. You can read about the sudoers file with man sudoers for details on the exact syntax and available options, but for simplicity's sake, you can do either of the following:

  • Create a group with the addgroup command, and then add that group to the sudoers file. Use addgroup <groupname> to create the group, and then edit the sudoers file (sudo visudo) and add the line %<groupname> ALL=(ALL) ALL to the bottom
  • Edit the sudoers file with sudo visudo, and add <username> ALL=(ALL) ALL at the bottom for each user you want to add.
2 of 6
29

The "popular" answer is how to "reimplement", not "how to add the user?". Bare minimum you need to do is this:

usermod -a -G sudo USERNAME

On my particular system, I am a member of the following groups:

usermod -a -G adm,cdrom,sudo,dip,plugdev,lpadmin,sambashare,libvirtd USERNAME

To verify what you have done:

groups USERNAME
๐ŸŒ
OSBoxes
osboxes.org โ€บ home โ€บ linux user management: how to delete users and create admin accounts
How to Delete Users and Create Admin Accounts in Linux - OSBoxes - Virtual Machines
March 29, 2025 - Learn how to safely delete Linux users (including home directories) and create new admin accounts with sudo privileges. Step-by-step commands
๐ŸŒ
Reddit
reddit.com โ€บ r/linux4noobs โ€บ standard user or admin for daily use
r/linux4noobs on Reddit: Standard user or admin for daily use
November 25, 2020 -

So new user here who has been reading up about Linux and decided to test run Linux Mint with dual boot when I read in some of the comments that it is not suggested for people to use root account for daily activities for security reasons. So I am just wondering if this root account is something that I need to activate (which then I do not plan on doing) or does it mean the administrative account that you get when you first made your account? If it is the admin account that you get when you make your first account should I add a standard account and then use that for my daily usage?