I am running CentOS 7 web server in a VM on our network, and it all looks like I am in the sudoer list but when I try anything with I get the following error:
$ sudo ls [sudo] password for dragonbite: dragonbite is not in the sudoers file. This incident will be reported.
I looked in /etc/group and verified I am in the wheel group
I ran visudo and verified the wheel group is listed
## Allows people in group wheel to run all commands %wheel ALL=(ALL) ALL
So it seems to me that everything is as it should be. I even tried adding the account from the first user by running
sudo usermod -aG sudo dragonbite
and got the message, after putting in that account's password
usermod: group 'sudo' does not exist
strange,... since it uses the wheel account as far as I know (CentOS). So I tried adding a sudo group with
sudo groupadd sudo
and then when I tried to add my account to the sudo group it didn't throw any errors. But the group sudo isn't in the sudoers file, and after adding myself to the sudo group I tested it and still get the same message of not being in the sudoers file.
So I am at a loss of what to do next.
- Add sudo to the sudoers list?
- Try making a new account and add it to sudo list?
- Restart the server (do not want to do)?
- Revert to latest VM and re-apply all the patches?