?
Solved

How to remove user from a group (linux)

Posted on 2011-10-04
2
Medium Priority
?
701 Views
Last Modified: 2012-05-12
Hi,

I added a user by mistake in a group. How can I remove it???
0
Comment
Question by:cismoney
2 Comments
 
LVL 8

Assisted Solution

by:pilson66
pilson66 earned 1000 total points
ID: 36908658
edit file /etc/group, and remove username from unneeded group.
example:

sambashare:x:120:pilson,user1,user2

sambashare:x:120:pilson,user1
0
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 1000 total points
ID: 36908666
For the primary group:

usermod -g newgroup userid

For the group set:

usermod -G newgroup1,newgroup2,... userid

These ways you're going to define a new primary group or a new group set. All former group memberships will be purged.

wmp
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses
Course of the Month14 days, 5 hours left to enroll

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question