Member of sudo group, getting “is not in the sudoers file.”

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












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



wheel:x:10:dragonbite


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?

Anybody?



Thanks







share|improve this question
















  • 2




    Did you log off and log on again after adding the relevant user to the wheel group? What is the output of the id command?
    – Wouter Verhelst
    Apr 3 at 14:12










  • I did log off and on and tried after changing things, and just logged back in after being off maybe 5 minutes and it still doesn't work. Running id command from the account I am trying to fix gives me $ id uid=1001(dragonbite) gid=1001(dragonbite) groups=1001(dragonbite),13(sudo) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
    – dragonbite
    Apr 3 at 14:23







  • 1




    Well, for whatever reason you're not in the wheel group.
    – roaima
    Apr 3 at 15:05










  • It's gotten worse. Now the account that WAS able to run sudo previously, when I typed up the initial piece, is no longer in the sudo/wheel group either! So now i have no admin rights left. I think we need to see about reverting the snapshot but does any of this sound like a process or something from a compromised system or attack?
    – dragonbite
    Apr 3 at 15:19










  • @dragonbite Did you make changes to the sudoers file or do the group membership of the other user? Does the sudoers file mention a sudo group?
    – Kusalananda
    Apr 3 at 15:43















up vote
1
down vote

favorite












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



wheel:x:10:dragonbite


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?

Anybody?



Thanks







share|improve this question
















  • 2




    Did you log off and log on again after adding the relevant user to the wheel group? What is the output of the id command?
    – Wouter Verhelst
    Apr 3 at 14:12










  • I did log off and on and tried after changing things, and just logged back in after being off maybe 5 minutes and it still doesn't work. Running id command from the account I am trying to fix gives me $ id uid=1001(dragonbite) gid=1001(dragonbite) groups=1001(dragonbite),13(sudo) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
    – dragonbite
    Apr 3 at 14:23







  • 1




    Well, for whatever reason you're not in the wheel group.
    – roaima
    Apr 3 at 15:05










  • It's gotten worse. Now the account that WAS able to run sudo previously, when I typed up the initial piece, is no longer in the sudo/wheel group either! So now i have no admin rights left. I think we need to see about reverting the snapshot but does any of this sound like a process or something from a compromised system or attack?
    – dragonbite
    Apr 3 at 15:19










  • @dragonbite Did you make changes to the sudoers file or do the group membership of the other user? Does the sudoers file mention a sudo group?
    – Kusalananda
    Apr 3 at 15:43













up vote
1
down vote

favorite









up vote
1
down vote

favorite











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



wheel:x:10:dragonbite


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?

Anybody?



Thanks







share|improve this question












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



wheel:x:10:dragonbite


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?

Anybody?



Thanks









share|improve this question











share|improve this question




share|improve this question










asked Apr 3 at 13:44









dragonbite

63




63







  • 2




    Did you log off and log on again after adding the relevant user to the wheel group? What is the output of the id command?
    – Wouter Verhelst
    Apr 3 at 14:12










  • I did log off and on and tried after changing things, and just logged back in after being off maybe 5 minutes and it still doesn't work. Running id command from the account I am trying to fix gives me $ id uid=1001(dragonbite) gid=1001(dragonbite) groups=1001(dragonbite),13(sudo) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
    – dragonbite
    Apr 3 at 14:23







  • 1




    Well, for whatever reason you're not in the wheel group.
    – roaima
    Apr 3 at 15:05










  • It's gotten worse. Now the account that WAS able to run sudo previously, when I typed up the initial piece, is no longer in the sudo/wheel group either! So now i have no admin rights left. I think we need to see about reverting the snapshot but does any of this sound like a process or something from a compromised system or attack?
    – dragonbite
    Apr 3 at 15:19










  • @dragonbite Did you make changes to the sudoers file or do the group membership of the other user? Does the sudoers file mention a sudo group?
    – Kusalananda
    Apr 3 at 15:43













  • 2




    Did you log off and log on again after adding the relevant user to the wheel group? What is the output of the id command?
    – Wouter Verhelst
    Apr 3 at 14:12










  • I did log off and on and tried after changing things, and just logged back in after being off maybe 5 minutes and it still doesn't work. Running id command from the account I am trying to fix gives me $ id uid=1001(dragonbite) gid=1001(dragonbite) groups=1001(dragonbite),13(sudo) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
    – dragonbite
    Apr 3 at 14:23







  • 1




    Well, for whatever reason you're not in the wheel group.
    – roaima
    Apr 3 at 15:05










  • It's gotten worse. Now the account that WAS able to run sudo previously, when I typed up the initial piece, is no longer in the sudo/wheel group either! So now i have no admin rights left. I think we need to see about reverting the snapshot but does any of this sound like a process or something from a compromised system or attack?
    – dragonbite
    Apr 3 at 15:19










  • @dragonbite Did you make changes to the sudoers file or do the group membership of the other user? Does the sudoers file mention a sudo group?
    – Kusalananda
    Apr 3 at 15:43








2




2




Did you log off and log on again after adding the relevant user to the wheel group? What is the output of the id command?
– Wouter Verhelst
Apr 3 at 14:12




Did you log off and log on again after adding the relevant user to the wheel group? What is the output of the id command?
– Wouter Verhelst
Apr 3 at 14:12












I did log off and on and tried after changing things, and just logged back in after being off maybe 5 minutes and it still doesn't work. Running id command from the account I am trying to fix gives me $ id uid=1001(dragonbite) gid=1001(dragonbite) groups=1001(dragonbite),13(sudo) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
– dragonbite
Apr 3 at 14:23





I did log off and on and tried after changing things, and just logged back in after being off maybe 5 minutes and it still doesn't work. Running id command from the account I am trying to fix gives me $ id uid=1001(dragonbite) gid=1001(dragonbite) groups=1001(dragonbite),13(sudo) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
– dragonbite
Apr 3 at 14:23





1




1




Well, for whatever reason you're not in the wheel group.
– roaima
Apr 3 at 15:05




Well, for whatever reason you're not in the wheel group.
– roaima
Apr 3 at 15:05












It's gotten worse. Now the account that WAS able to run sudo previously, when I typed up the initial piece, is no longer in the sudo/wheel group either! So now i have no admin rights left. I think we need to see about reverting the snapshot but does any of this sound like a process or something from a compromised system or attack?
– dragonbite
Apr 3 at 15:19




It's gotten worse. Now the account that WAS able to run sudo previously, when I typed up the initial piece, is no longer in the sudo/wheel group either! So now i have no admin rights left. I think we need to see about reverting the snapshot but does any of this sound like a process or something from a compromised system or attack?
– dragonbite
Apr 3 at 15:19












@dragonbite Did you make changes to the sudoers file or do the group membership of the other user? Does the sudoers file mention a sudo group?
– Kusalananda
Apr 3 at 15:43





@dragonbite Did you make changes to the sudoers file or do the group membership of the other user? Does the sudoers file mention a sudo group?
– Kusalananda
Apr 3 at 15:43
















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f435281%2fmember-of-sudo-group-getting-is-not-in-the-sudoers-file%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f435281%2fmember-of-sudo-group-getting-is-not-in-the-sudoers-file%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

Peggy Mitchell

Palaiologos

The Forum (Inglewood, California)