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.
Asked
Active
Viewed 6,189 times
4
muru
- 207,228
thankgodforthissite
- 149
- 2
- 10
1 Answers
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