How to create a new sudo user on Ubuntu Linux server

www.lau‮rutt‬i.com
How to create a new sudo user on Ubuntu Linux server

To create a new sudo user on an Ubuntu Linux server, you can follow these steps:

  1. Connect to the server using an account with sudo privileges.

  2. Run the adduser command to create a new user account. Replace username with the desired username:

sudo adduser username
  1. Follow the prompts to set the password and other user information for the new account.

  2. Run the usermod command to add the new user to the sudo group:

sudo usermod -aG sudo username
  1. Log out of the current account and log in to the server using the new sudo user account.

  2. To test the sudo privileges of the new user, run a command that requires root privileges, such as apt-get update. You will be prompted to enter the password for the new user account:

sudo apt-get update

If the password is accepted and the command executes successfully, the new user has been granted sudo privileges.

Created Time:2017-10-28 21:39:01  Author:lautturi