How to create a new user with admin privileges on Linux

Published on:

|

Categories: , ,

|

Modified Date:

Adding a user with admin privileges on Linux is easier than you think. When you create a new user, that user doesn’t have admin privileges. What do you do? This video shows you how.


Commands:

UBUNTU SERVER
sudo adduser USERNAME
sudo usermod -aG sudo USER

CENTOS
sudo adduser -m USER
sudo passwd USER
sudo passwd –expire USER
sudo usermod -aG wheel USER


What you’ll learn
1. How to create a sudo-able user on Ubuntu Server
a. How to create the user with only two commands
b. How to create a password for the user with adduser command
c. How to automatically create the new user’s home directory
d. How to give the user sudo rights
e. How to create a new user and given them sudo privileges on Ubuntu Server
2. How to create a sudo-able user on CentOS
a. How to create the user with command
b. How to ensure the home directory is created along with the user
c. How to set the password for the user
d. How to set the password such that the user will have to change their password upon first login
e. How to set an initial password with the command
f. How to expire the password with the command
g. How to create a new username h. How to give the user admin privileges with the command
3. How to create a new user and given them sudo privileges on both Ubuntu and CentOS
4. How to remove sudo rights
a. How to edit the etc group file
b. How to remove username from either the sudo or the wheel entry
c. How to see the new user listed
d. How to save your edit in the etc group file
5. How to create new users with admin privileges on Linux














Song: Thomas Gresen – Another Life
Music provided by Vlog No Copyright Music.
Creative Commons – Attribution 3.0 Unported
Video Link: https://youtu.be/4Sh8uXe5KrY

#computerEverywhere #howtocreate #newuser #admin #privileges #linux