How To Create a Sudo User

How To Create a Sudo User CentOS

Login into your server as root. If you already have user you can use usermod  command ro add the user to the wheel group:

# usermod -aG wheel username

For testing sudo for that user switch to that user account:

# su username

And then check can you use sudo. For example you can try basic command:

$ sudo ls -la /root

You will be prompted for the password, enter the password and command will run with root privileges.

arstech

Leave a Reply