On a CentOS 7 server, a user is added to the wheel group, but then that same user is not able to run sudo
commands.
What specific commands need to be added to the below in order for the user named wannabe_sudoer_user
to be allowed to run sudo
commands?
The Specifics:
Here is the terminal log that shows the failed attempt to add the wannabe_sudoer_user
user to the sudoers
list:
[wannabe_sudoer_user@localhost ~]$ su -
Password:
Last login: Mon May 15 13:58:21 PDT 2017 on ttyS0
[root@localhost ~]# gpasswd -a wannabe_sudoer_user wheel
Adding user wannabe_sudoer_user to group wheel
[root@localhost ~]# exit
logout
[wannabe_sudoer_user@localhost ~]$ sudo mkdir /opt/atlassian/
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
[sudo] password for wannabe_sudoer_user:
wannabe_sudoer_user is not in the sudoers file. This incident will be reported.
newgrp wheel
– Jeff Schaller May 15 '17 at 21:24wheel
to the sudoers roster is not commented out in/etc/sudoers.conf
. – DopeGhoti May 15 '17 at 21:25