0

I added a user to the sudoers file using ['sudo gpasswd -a orca wheel']. This command was successful as per ""Adding user orca to group wheel"" but the user can not execute root commands still. I have logged out and logged back in.

%wheel ALL=(ALL) ALL was un-commented by default in the sudoers file.

I am using CentOS7.

Any help is greatly appreciated. I found the following article the best: https://www.digitalocean.com/community/tutorials/how-to-edit-the-sudoers-file-on-ubuntu-and-centos

0

2 Answers 2

1

Technically, the command you're giving does not add a user to the sudoers file. It adds a user to the group 'wheel', which is in the sudoers file.

Your setup should allow user orca to run sudo.

Maybe it's an obvious question, but are they actually using the sudo command? For instance they can try sudo whoami and that should print root.

What the sudoers system does not do is bypass permissions; they still need to use the sudo command. If you want to be able to go around in god mode the entire time, you should log in as root, for instance with sudo su -

1
  • [sudo whoami] gives the same error "not in the sudoers file. This incident will be reported." I use su - often however, when I su - it changes the files in my directory from user to root. This is creating a problem that I can't access the downloads directory from firefox as root. At least I don't know how. The Downloads directory as root is blank. Commented Nov 4, 2019 at 4:11
0

b00m! fixed it. Simply add the user under root in the section below.

## Allow root to run any commands anywhere 

root ALL=(ALL) ALL user ALL=(ALL) ALL

1
  • 1
    not a fix, you did something different.
    – Jasen
    Commented Nov 4, 2019 at 23:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .