If you want to add or remove users from the sudo group on Ubuntu, you can follow the below examples,
Add user to Sudo Group
% sudo adduser c2c sudo
Adding user `c2c' to group `sudo' ...
Adding user c2c to group sudo
Done.
If the user already exists in the sudo group make use of sudo adduser command,
% sudo adduser c2c sudo
The user `c2c' is already a member of `sudo'.
Remove user to Sudo Group
In order to remove a user from sudo group you can make use of sudo deluser command,
% sudo deluser c2c sudo
Removing user `c2c' from group `sudo' ...
Done.
Again, if you try to remove a user that does not exist in sudo group you will get below error,
bash|/usr/sbin/deluser: The user `c2c' is not a member of group `sudo'.
More Posts related to Ubuntu,
- Fix - sudo: systemctl: command not found
- How to know the version of Ubuntu
- [Fix] Ubuntu E: Unable to locate package sudo error
- How to install Apache Maven on Ubuntu
- Steps to Kill a Running Process in Ubuntu Linux
- How to know current Ubuntu Linux version via terminal command
- How to stop/start/restart apache server using command [Ubuntu]
- Fix: Ubuntu (Linux) - bash: sudo: command not found error
- Ubuntu: How to search for a package to install using apt in Terminal
- Fix: E: Command line option --installed is not understood in combination with the other options
- How to install Python on Ubuntu
- Ubuntu Linux: How to Login as root User
- Access Windows share folder in Ubuntu Device in Network
- Add a User as a Sudoer Using Ubuntu Linux Command Line Terminal
- Install Oh My Zsh on Ubuntu Docker complete steps
- Fix: Make makefile:31 Error 127 (GCC)
- [fix] openssl No such file or directory error C++
- How to install zsh shell on Ubuntu
- Install Golang (Go) on Ubuntu
- Ubuntu Linux: Unzip a zip file using Terminal
- Where are Environment Variables stored in Ubuntu
- apt-get list --installed packages in Ubuntu Linux
- Ubuntu: List all Installed Packages using apt
- Quick steps to install Nginx on Ubuntu Linux
- How to kill service running on a port on Ubuntu Linux
More Posts:
- Fix Power BI error Access to the resource is forbidden when connecting SharePoint Online List as data source - SharePoint
- How to reset Eclipse IDE Code Font - Eclipse
- Java 8 Supplier Functional Interface Examples - Java
- Fix: error: non-static type variable T cannot be referenced from a static context - Java
- How to turn off Stage Manager - macOS Ventura - MacOS
- 🎃 Halloween Hashtag 2022 on Social Media 🎃 - Hashtags
- 25: How to rename a file using Python Program - Python-Programs
- Java Stream Word Count Example - Java