RHEL 8 / Centos 8 Add new sudo user

Last updated on August 21st, 2020 at 11:23 am.

This is a quick tutorial that will show you how to add a user with sudo privileges.

Instead of using root user, always disable root login and use the sudo user for login in and operating your server.

Step 1 – Add a new user called Joey

Add a new user named Joey . Replace Joey with your intended username.

adduser Joey

Set a password for Joey. You’ll be prompted to input and confirm a password. Ensure the password is strong by using a mixture of small , capital and special alphanumeric characters.

passwd Joey

Add new user to wheel group

Add the new user , Joey to the wheel group so that it can assume root privileges using the sudo command.

usermod -aG wheel Joey

Test the new user by login in as follows:

Switch to the new user you’ve created.

su - Joey

Add your password to login. Then run some sudo command eg:

sudo dnf update

Enter your password again, to use sudo commands. If it runs with no warnings or errors then you have anew sudo user.

That is how to create a new Sudo user in Centos 8 or RHEL 8

Recommended VPS Providers

Find out the VPS providers I recommend.

Sign up below to download a Free Getresponse PDF Tutorial.

Cheapest dedicated Server provider. View prices.
The most reliable VPS cloud provider - Vultr Cloud

Comment Here

We use cookies on Bizanosa.com. Continuing to use this website, implies consent of our Privacy Policy Privacy Policy

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.