Re: Users, groups and directory access

From: A.J. Bonnema (abonnema_at_xs4all.nl)
Date: 05/05/04

  • Next message: Davide Dolcini: "Laptop Battery"
    Date: Wed, 05 May 2004 15:48:57 +0200
    To: For users of Fedora Core releases <fedora-list@redhat.com>
    
    

    Matthew Miller wrote:
    > On Wed, May 05, 2004 at 03:30:07AM -0500, David L Norris wrote:
    >
    >># root can change john's group membership like this
    >>usermod -G proj john
    >
    >
    > This is bad because it *replaces* the current list of groups. If john was
    > previously a member of 'staff' or 'proj2', that would be removed. This is
    > why gpasswd -a is usually better.
    >
    >

    Thanks for allerting me to this detail!

    Yes, well I can confirm, although it doesn't work as I expected after
    reading the man-page.

    The primary group is never deleted (the man-page only mentions that
    groups not listed will be deleted, which appears not to be true for the
    primary group.

    If you add the primary group using 'usermod -G' then all secondary
    groups are deleted from this user.
    If you add a secondary group, that is new to this user, the old
    secondary groups are all deleted (from this user). The primary group
    remains in effect.

    Guus.

    -- 
    A.J. Bonnema, Leiden The Netherlands,
    user #328198 (Linux Counter http://counter.li.org)
    -- 
    fedora-list mailing list
    fedora-list@redhat.com
    To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
    

  • Next message: Davide Dolcini: "Laptop Battery"

    Relevant Pages

    • Re: More Questions Re Add User In Red Hat 9.0
      ... Chris Share wrote: ... What is the difference between a Primary and Secondary group? ... The Primary group group of a user is the group assigned in /etc/passwd and ... thus write them, but other non-root, non-group-vfat users can't. ...
      (alt.os.linux)
    • Re: Users, groups and directory access
      ... A.J. Bonnema wrote: ... > Thanks for allerting me to this detail! ... > The primary group is never deleted (the man-page only mentions that ... > If you add a secondary group, that is new to this user, the old ...
      (Fedora)