menu
  + 
    #### 
    Reliable web hosting for your business or personal sites. cPanel + Litespeed included on fast NVMe storage.
    Loaded features and overselling enabled plans to help grow your business. cPanel/WHM + LiteSpeed + NVMe.
    Fine-tuned and optimized for all WordPress sizes. No i/io limits, AccelerateWP + cPanel + LiteSpeed + NVMe.
    KVM VPS servers with NVMe standard. Fast setup. **Free VPS control panel included.**
    Enterprise grade bare-metal servers with **1G / 10G unmetered** options. Fast provisioning.
 / Knowledge Base
# How to Add or Remove a User from a Group in Linux
## Knowledge Base
1470
July 30, 2023
## Table of Contents
1. 
2. 
3. 
Linux is by default a multi-user system (meaning many users can connect to it simultaneously and work), thus user management is one of the fundamental tasks of a system administrator. User management includes everything from creating, updating, and deleting user accounts or user groups on a Linux system.
In this short quick article, you will learn how to add or remove a user from a group in a Linux system.
### Check a User Group in Linux
To check a user group, just run the following `groups` command and provide the **username** (**tecmint** in this example) as an argument.
```
# groups tecmint
tecmint : tecmint wheel
To check your own **groups**, just run the `groups` command without any argument.
# group
root
Check a User Group in Linux
### Add a User to a Group in Linux
Before trying to add a user to a **group**, ensure that the user exists on the system. To add a user to a certain group, use the  with the `-a` flag which tells the **usermod** to add a user to the supplementary group(s), and the `-G` option specifies the actual groups in the following format.
In this example, **tecmint** is the username and **postgres** is the group name:
# usermod -aG postgres tecmint
Add User to Group in Linux
### Remove a User from a Group in Linux
To remove a user from a group, use the **gpasswd** command with the `-d` option as follows.
# gpasswd -d tecmint postgres
Remove User from Group in Linux
Additionally, on **Ubuntu** and it’s derivative, you can remove a user from a specific group using the `deluser` command as follows (where **tecmint** is the username and **postgres** is the group name).
$ sudo deluser tecmint postgres
For more information, see the man pages for each of the different commands we have used in this article.
source: <
Tags: 
0
Share Feedback
email
 Submit
previous article
#### 
next article
### Leave a Reply 
You must be  to post a comment.
* cPanel
* Control Panels
* Linux Tips
* Monitoring
* Operating Systems
* Random Stuff
!
The **LOGICWEB** logo is a registered trademark of LogicWeb Inc. All rights reserved. © 2024
**Company**
**Policies**
**Support**
# Repair MySQL Databases via SSH
581
## **Repairing a Corrupted MySQL Database Table**
Please refer to the following steps:
1. First, log in to your MySQL server using Secure Shell (SSH).
2. Then, enter the following command at root prompt:
`mysqlcheck -r [database name]`
Where, **mysqlcheck** is the command to check the database, **-r** is the command to repair the corrupted tables. Replace the [database name] with your actual database name.
**Please note that MyISAM** is a default storage engine of MySQL, unless you change it. Mostly MyISAM is set as default engine to check and repair all the tables in the mysql database.
If the above doesn’t work, then you can try the following commands via the Linux shell prompt.
`myisamchk -r /var/lib/mysql/[database name]/*`
Where, **myisamchk** is a command to check mysql database and **-r** is a command to repair the corrupted tables.
Tags: , 
1