4

Hi I executed this command sudo adduser username sudo and am wondering how do I take that username out from being able to execute sudo. I checked the sudoers file but the username that I added thru the command line is not in there. Does anyone know what command should I execute to take out the username? Thank you.

muru
  • 207,228

1 Answers1

5

adduser username sudo adds username to the sudo group. Members of the sudo group are allowed sudo access in the default sudoers file:

%sudo   ALL=(ALL:ALL) ALL

You shouldn't remove this line just to deny this user sudo access. Instead, undo the group addition:

sudo deluser username sudo
muru
  • 207,228