Remove sudo privileges from a user (without deleting the user)

Just type

sudo deluser username sudo

This will remove the user named username from the group sudo.

Be careful not to remove the real adminuser from the sudo group.


If you're like me, you are just trying to figure out how to take away sudo access from a user. It's easy, just open sudo, and type the following in. Keep in mind that USERNAME can be replaced by the profile you are doing this to. In terminal type:

sudo deluser USERNAME sudo

This will only take sudo access away from the profile named USERNAME, and will not delete!


You can also use gpasswd:

sudo gpasswd -d username sudo

This will remove username from group sudo.

Tags:

Sudo