I keep getting "user is not in the sudoers file" even after I add myself to the sudo group.
How can I fix this?
I keep getting "user is not in the sudoers file" even after I add myself to the sudo group.
How can I fix this?
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
.
sudo
group is added tosudoers
file? – Romeo Ninov Mar 16 '24 at 15:18