Unix/Linux Go Back    


Solaris The Solaris Operating System, usually known simply as Solaris, is a Unix-based operating system introduced by Sun Microsystems. The Solaris OS is now owned by Oracle.

How to remove user from a group using command line

Solaris


Closed Linux or Unix Question    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 05-08-2007
civic2005 civic2005 is offline
Registered User
 
Join Date: May 2005
Last Activity: 12 January 2010, 12:34 AM EST
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
How to remove user from a group using command line

Hi,

Wanted to remove a user from a group , but no GUI , must use command line
Sponsored Links
    #2  
Old Unix and Linux 05-08-2007
zazzybob's Unix or Linux Image
zazzybob zazzybob is offline Forum Advisor  
Registered Geek
 
Join Date: Dec 2003
Last Activity: 13 May 2013, 9:02 AM EDT
Location: Melbourne, Australia
Posts: 2,185
Thanks: 3
Thanked 25 Times in 23 Posts
You can use the -G option to usermod to specify a comma separated list of secondary groups you want the user to be a member of - i.e. include all their previous secondary group memberships excluding the group you want to remove them from.

I always just vi /etc/group directly. Far easier than specifying a list of secondary groups to usermod.

Cheers,
ZB
Sponsored Links
    #3  
Old Unix and Linux 09-18-2008
jaghelp323 jaghelp323 is offline
Registered User
 
Join Date: Sep 2008
Last Activity: 26 March 2009, 9:12 PM EDT
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Java

Its a good idea to change /etc/group file. But, the changes to this file doesnt get into effect immediately. For example, if root delete an user from a group, the user has to logout and login back to get the changes into effect.

Any suggestions for instant update of changes made??
Sponsored Links
Closed Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Remove Command-Line Option from String mattmiller Shell Programming and Scripting 7 07-07-2010 05:39 PM
Command to remove First and Last line from a File ragz_82 UNIX for Dummies Questions & Answers 1 09-03-2009 10:10 AM
How can I remove those duplicate sequence in UNIX?What command line I should type? patrick chia Shell Programming and Scripting 4 01-23-2009 12:18 AM
awk help required to group output and print a part of group line and original line rajan_san Shell Programming and Scripting 5 10-27-2008 09:16 AM
Deny dba command to a user group!! masquerer UNIX for Dummies Questions & Answers 3 06-20-2007 10:58 AM



All times are GMT -4. The time now is 11:51 AM.