I had install centOS 7 minimal version in my virtualbox in Ubuntu mate. It has no GUI. It is totally CLI. My user name is Smit and able to login in to it. But when i type commandsudo yum updateand enter my password, it saysSmit is not in sudoers files. This incident will be reported.But when I try to add my user to sudo group by commandadduser Smit sudogives something like this:(I am unable to copy-paste via virtual-box. I do this by login in root.)    
cant add user to sudo group in centOS 7 i386(no GUI,Its minimal)
centos;command line;sudo;users;privileges
I don't know why your command doesn't work. It may have to do with either:your CentOS not using sudo by defaultthe way the sudoers file should be editedthe syntax of adduser command on that particular machine.Apparently, and it is my guess, it's first of all a matter of the last point.Anyhow, the easiest way is to add the user to the wheel group, which should have sudo priviliges on your CentOS. Try out this command:usermod -aG wheel SmitThis of course has to be done by root. Once successfully executed, change identity to Smit and check if you can sudo.su - Smitsudo yum updateAs an alternative, you can use visudo. Adding this line should do:Smit ALL=(ALL) ALLBut here's a guide with a few more details if you're interested. 