The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > SUN Solaris
.
google unix.com



SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Defaults number of users and Groups tirupathiraju_t SUN Solaris 2 06-06-2009 09:09 AM
users and groups sammet UNIX for Dummies Questions & Answers 1 12-06-2007 11:52 AM
Removing user from multiple groups via command line jquizon62 SUN Solaris 1 10-28-2004 12:56 PM
listing users and groups jalburger Linux 2 06-16-2004 12:37 PM
Users and groups rsanz Security 2 08-05-2002 02:46 PM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 3 Weeks Ago
the_red_dove the_red_dove is offline
Registered User
  
 

Join Date: Aug 2009
Location: California
Posts: 23
Removing users from groups

How do I remove a user from a group? I'm using the usermod command but its not working.
I have a user "abc" who is a member of the groups root and other. I'm trying to remove him from the group "other" (using CLI) which is his secondary group but it's not working.
How do I do this? Is there any other command that I am supposed to use instead of usermod??
  #2 (permalink)  
Old 3 Weeks Ago
jlliagre jlliagre is offline Forum Advisor  
ɹǝsn sıɹɐlosuǝdo
  
 

Join Date: Dec 2007
Location: Paris
Posts: 1,383
Code:
vi /etc/group
  #3 (permalink)  
Old 3 Weeks Ago
hari.jnvc90 hari.jnvc90 is offline
Registered User
  
 

Join Date: Nov 2007
Location: Tirupati
Posts: 5
Ur doing right ... Do with usermod -g <Primary> -G <Secondry> <Username>

the above should work with out any proble..

=Hari.A.
  #4 (permalink)  
Old 3 Weeks Ago
the_red_dove the_red_dove is offline
Registered User
  
 

Join Date: Aug 2009
Location: California
Posts: 23
Well, it's not working. That's why I ended up posting it here!! Let me rephrase my doubt. I don't want make the user a member of any secondary group. He should continue to be a member of the primary group but I want to delete him from his secondary group. Usermod is not working.
  #5 (permalink)  
Old 3 Weeks Ago
jlliagre jlliagre is offline Forum Advisor  
ɹǝsn sıɹɐlosuǝdo
  
 

Join Date: Dec 2007
Location: Paris
Posts: 1,383
Again, as I'm afraid you missed it:
Code:
vi /etc/group
  #6 (permalink)  
Old 3 Weeks Ago
salman103 salman103 is offline
Registered User
  
 

Join Date: Sep 2009
Posts: 8
Hi! Yes thats right i thinks you are missing /etc/group other wise go try with Chmode --help for list of multiple commands you may perform.


Quote:
Originally Posted by jlliagre View Post
Again, as I'm afraid you missed it:
Code:
vi /etc/group
  #7 (permalink)  
Old 3 Weeks Ago
the_red_dove the_red_dove is offline
Registered User
  
 

Join Date: Aug 2009
Location: California
Posts: 23
Hey jlliagre,
I saw that the first time you posted.
Two issues:
1. I'm trying to find out if I can do it using usermod.
2. I have no clue how to edit the /etc/group to remove a user from there. The entry in the file is [other::1:]
So, here I am scratching my head how to edit that and remove him from the group!!

---------- Post updated at 03:50 PM ---------- Previous update was at 03:45 PM ----------

In case if my command worked and removed the user from the group, why is it still showing the group 'other' when I say [groups user]??? I'm totally lost!!

---------- Post updated at 07:32 PM ---------- Previous update was at 03:50 PM ----------

Guys,
Thanks for your support and all the suggestions. The user "was" removed from the group but it was only updated after reboot. I think I'll give it a break before I start to think why I needed a reboot!!

---------- Post updated at 07:33 PM ---------- Previous update was at 07:32 PM ----------

Guys,
Thanks for your support and all the suggestions. The user "was" removed from the group but it was only updated after reboot. I think I'll give it a break before I start to think why I needed a reboot!!
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:59 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0