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?

6
  • Post groups command output, this will print dims groups.
    – Lety
    Oct 19, 2014 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, 2014 at 3:36
  • Related: How do I add myself back as a sudo user?
    – Seth
    Oct 20, 2014 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) Oct 20, 2014 at 3:49
  • 1
    You might have dropped out of other groups too, see: askubuntu.com/a/59367/260447 Oct 20, 2014 at 3:50

1 Answer 1

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 .