Ubuntu: create a user and add it to the sudo group

Small memo to create a user on Ubuntu and add it to the sudo group:

sudo adduser NomUtilisateur

Enter the password for the current user (sudo) if necessary, then enter the password for the new account twice and enter additional information as required.

Confirm the information by pressing Enter.

Now we add the user to the sudo group.

Enter the command below

sudo usermod -aG sudo NomUtilisateur

The command did not return

The user is created and a member of the sudo group.

Romain Drouche
System Architect | MCSE: Core Infrastructure
IT infrastructure expert with over 15 years of field experience. Currently a Systems and Networks Project Manager and Information Systems Security (ISS) expert, I use my expertise to ensure the reliability and security of technological environments.

Leave a Comment