0

I keep getting "user is not in the sudoers file" even after I add myself to the sudo group.

How can I fix this?

MC68020
  • 7,981

1 Answers1

3

Ensure id shows you are in the "sudo" group (logout/login if needed). Also, ensure that there is a directive like %sudo ALL=(ALL:ALL) ALL in the sudoer config. Also, sometimes distros (or installed features) add "big brother" overrides via the @includedir directive usually at the end of the main sudoers config; retry again after commenting that out (to see if that is the problem ... if so, you may need to add the %sudo line after the @includedir). Of course, to check/change the config with visudo, you'll need to become root or another user with sudo privileges; and to check the effect of changes, use sudo -l.

GammaZoid
  • 114
  • still didn't work I CONFIRMED that I have in the sudo group and checked the sudoer config file so I just ended up manually adding myself to the sudoers file – ZGuardian Mar 17 '24 at 19:59