Re: usermod

From: Ed Wilts (ewilts_at_ewilts.org)
Date: 03/30/05

  • Next message: Steve Buehler: "Re: usermod"
    Date: Wed, 30 Mar 2005 09:47:16 -0600
    To: General Red Hat Linux discussion list <redhat-list@redhat.com>
    
    

    On Wed, Mar 30, 2005 at 08:20:44AM -0600, Steve Buehler wrote:
    > 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?

    man gpasswd.

    This appears to be a very little-known tool. I don't know why that's
    so, but it is a great utility for exactly this reason.

    To remove the group sam from user steve:

    # gpasswd -d steve sam

    -- 
    Ed Wilts, RHCE
    Mounds View, MN, USA
    mailto:ewilts@ewilts.org
    Member #1, Red Hat Community Ambassador Program
    -- 
    redhat-list mailing list
    unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
    https://www.redhat.com/mailman/listinfo/redhat-list
    

  • Next message: Steve Buehler: "Re: usermod"

    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)
    • RE: usermod
      ... >>For the life of me, I can't figure this one out. ... HTH ... And "usermod -g steve steve" will not do it ...
      (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)