RE: usermod

From: Steve Buehler (steve_at_ibapp.com)
Date: 03/30/05

  • Next message: Alexey Fadyushin: "Re: Linux Setup Floppy Disc"
    Date: Wed, 30 Mar 2005 08:41:14 -0600
    To: General Red Hat Linux discussion list <redhat-list@redhat.com>
    
    

    At 08:34 AM 3/30/2005, you wrote:
    >>-----Original Message-----
    >>From: Steve Buehler [mailto:steve@ibapp.com]
    >>Sent: Wednesday, March 30, 2005 8:21 AM
    >>To: redhat-list@redhat.com
    >>Subject: usermod
    >>
    >>
    >>I know you can use "usermod" on RedHat Linux to add a user to another group
    >>by typing:
    >>usermod -G sam,frank steve
    >>This would effectively add steve to the "frank" and "sam" group. How do
    >>you remove them from those groups without editing the /etc/group file
    >>manually? I can do:
    >>usermod -G steve steve
    >>That will remove him from "sam" and "frank" groups but would add steve to
    >>his own group so the /etc/group file would look like:
    >>steve:x:590:steve
    >>instead of just:
    >>steve:x:590:
    >>For the life of me, I can't figure this one out. Does anybody know?

    >If you "usermod -G sam,frank steve" and realize that you shouldn't have put
    >steve in the frank group, just "usermod -G sam steve" and by omission, will
    >remove the user from the group. HTH

    Yes, but what if I want to remove him from both groups. You can't type
    "usermod -G steve". Basically, I am wanting to remove him from ALL groups
    except for his initial group. And "usermod -g steve steve" will not do it
    either. The "-G" must have atleast one group as an
    option..................................I just tried something that seems
    to work, but not sure if it is suppose to work this way. I typed:
    usermod -G "" steve
    and that removed steve from all extra groups. So either my problem is
    solved, or there is another "proper" way of doing it.

    Thanks for your help
    Steve

    -- 
    redhat-list mailing list
    unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
    https://www.redhat.com/mailman/listinfo/redhat-list
    

  • Next message: Alexey Fadyushin: "Re: Linux Setup Floppy Disc"

    Relevant Pages

    • RE: usermod
      ... "usermod -Gsteve steve" should remove him from all groups except steve. ... and that removed steve from all extra groups. ...
      (RedHat)
    • RE: usermod
      ... If you "usermod -G sam,frank steve" and realize that you shouldn't have put ... This would effectively add steve to the "frank" and "sam" group. ...
      (RedHat)
    • usermod
      ... I know you can use "usermod" on RedHat Linux to add a user to another group ... This would effectively add steve to the "frank" and "sam" group. ...
      (RedHat)
    • Getting rid of anger
      ... Steve, he's trying to share with you a little tool that we use in 12 step ... bitterness before it ruins their life". ... > Please point out where this was my fault. ... > to an ad homimen attack on me every time. ...
      (alt.support.stop-smoking)
    • Re: Assisted Dying
      ... > The problem you will have Steve, by refusing to contemplate the desire of ... We shouldn't accept people's lives are worthless adn not ... If that means ending their life then I think we should, ... Steve M ...
      (uk.philosophy.humanism)