LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 07-10-2009, 01:49 AM   #1
iamjayanth
Member
 
Registered: Oct 2008
Posts: 51

Rep: Reputation: 15
how to remove a user from secondary group using command line


Sir ,

I have a user 'jai' and his primary group is 'jai'. This user is also a member of group 'student'. I want to remove this user from student group. Can i do this from command line.
 
Old 07-10-2009, 02:17 AM   #2
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,498

Rep: Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956
Code:
gpasswd -d jai student
or just edit the file /etc/group and remove jai from the list of users in the student group.
 
Old 07-10-2009, 11:12 PM   #3
iamjayanth
Member
 
Registered: Oct 2008
Posts: 51

Original Poster
Rep: Reputation: 15
Thanks colucix...It worked wonderfully...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it possible to add/remove a user to a group without logging out and in again? [KIA]aze Linux - General 12 03-01-2009 05:49 PM
How to remove user from their secondary group? Akhran Linux - Newbie 2 09-13-2006 04:09 AM
create user with secondary group levis_inferno Linux - Networking 6 05-31-2006 12:33 AM
remove a user from group in fedora core 3 bnarenderraju Fedora 7 07-20-2005 09:32 AM
group command line tools m2azer Linux - General 4 10-31-2004 09:37 PM


All times are GMT -5. The time now is 08:43 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration