Linux – Centos 7 – adding a user to sudoers group – still is not in the sudoers file – why

centoslinuxredhatsudouser-management

[user@localhost ~]$ su -
Password: 
Last login: ...
[root@localhost ~]# usermod -aG wheel user
[root@localhost ~]# exit
logout
[user@localhost ~]$ sudo echo 123
[sudo] password for user: 
user is not in the sudoers file.  This incident will be reported.

What do I do wrong?

Best Answer

My experience is that 'user' needs to log out and in again. Try the 'id' command to see if the system thinks that 'user' is in the wheel group or not.