I am trying to grant sudo privileges to a user of a CentOS 7 devbox by typing gpasswd -a user wheel, but the attempt is failing.  What am I doing wrong? Here is what I typed:  I discovered that the user is not in the wheel group as follows:  [user@localhost git]$ sudo yum install git[sudo] password for user: Sorry, try again.[sudo] password for user: Sorry, try again.[sudo] password for user: user is not in the sudoers file.  This incident will be reported.I then logged in as root and typed the following to add the user to the wheel group:  [user@localhost git]$ su -Password: Last login: Thu Aug 20 17:11:31 PDT 2015 on pts/0[root@localhost ~]# gpasswd -a user wheelAdding user user to group wheel[root@localhost ~]# exitlogoutI finally tried to use the sudo command again but it failed as follows:  [user@localhost git]$ sudo yum install git[sudo] password for user: user is not in the sudoers file.  This incident will be reported.[user@localhost git]$ 
error when adding user to wheel group in CentOS 7
centos;terminal;sudo;yum
Group changes on unix are not recognized by existing login sessions; assuming, say, a Linux system with the usermod command:$ groupsuser$ sudo usermod -G wheel $USER...$ grep user /etc/group | grep wheelwheel:x:10:user$ groupsuserTo see the group change, any existing sessions (e.g. SSH, X11, etc.) must be exited, and a new session made (e.g. open a new SSH connection, login in again via X11, etc):$ ssh localhost...$ groupsuser wheel... or you could reboot the box, which would mandate new sessions be created once the host comes back up.