How To Add Users To Sudoers Group On Centos
First Login as root.
Create User
Let us create a dummy user first for this example.
adduser dummyuser
Create Password For User
Create password for our dummyuser.
passwd dummyuser
Add User To Wheels Group
usermod -aG wheel dummyuser
Adding User to the Sudoers File
To add user to sudoers file, we need to edit /etc/sudoers. Open the file using vi or vim.
vi /etc/sudoers
Add following line at the end in above file...
dummyuser ALL=(ALL) ALL
That's it. Now open a new shell and login as dummyuser. For any system level (root) tasks, just add sudo to the beginning of command line.