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

If you give a user sudo privileges how can I remove the sudo privileges and make the user become just a regular user?

I used:

sudo adduser username sudo

Now I've changed my mind.

1

3 Answers

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.

1

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!

2

You can also use gpasswd:

sudo gpasswd -d username sudo

This will remove username from group sudo.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like