9

I started to receive a message

dims is not in the sudoers file.  This incident will be reported.

about myself.

How could this happen?

The suspicious command I made was creating group "advanced" and adding myself to it.

addgroup advanced
usermod -G advanced dims

Could this break my sudo rights?

marked as duplicate by Volker Siegel, muru, Braiam, Avinash Raj, Eric Carvalho Oct 20 '14 at 16:09

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Post groups command output, this will print dims groups. – Lety Oct 19 '14 at 18:40
  • @VolkerSiegel While I think the questions are related, I'm not so sure this is a dupe. IMO Dims is asking how or why this happened, not how to fix it. The answer here wouldn't fit on the other question either, which is a strong suggestion they are not duplicates. – Seth Oct 20 '14 at 3:36
  • Related: How do I add myself back as a sudo user? – Seth Oct 20 '14 at 3:37
  • @Seth I see - I was noticing that other question has an answer also mentioning the other groups - but it's more a related, and not strictly relevant to the "how comes" question (but very relevant to the "how to fix" question) – Volker Siegel Oct 20 '14 at 3:49
  • 1
    You might have dropped out of other groups too, see: askubuntu.com/a/59367/260447 – Volker Siegel Oct 20 '14 at 3:50
22

After

usermod -G advanced dims

the user dims is only a member of the group advanced but not of any other group. So as he isn't a member of the group admin or sudo he is no longer allowed to use sudo.

To just add a user to another group you need to use the -a switch to usermod, like

usermod -a -G advanced dims

Not the answer you're looking for? Browse other questions tagged or ask your own question.