Create Users and Manage Their Sudo Privileges on Ubuntu

create sudo user

 

The sudo command allows normal users to run programs which are only available to the root user. In this tutorial, we will show you how to create a system user and manage its sudo privileges on a Linux VPS running Ubuntu 16.04 as an operating system.

First of all, connect to your Linux server via SSH and add a new system user:

# adduser newuser

Feel free to replace newuser with the name of the system user you want to add. You will need to enter a password for your new user as well as you will need to enter some random user information. You can generate a strong password through the command line.

# adduser newuser
Adding user `newuser' ...
Adding new group `newuser' (1001) ...
Adding new user `newuser' (1001) with group `newuser' ...
Creating home directory `/home/newuser' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for newuser
Enter the new value, or press ENTER for the default
        Full Name []: New User
        Room Number []: 101
        Work Phone []: 123456
        Home Phone []: 123456
        Other []:
Is the information correct? [Y/n] y

Read More