Re: Users, groups and directory access

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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)



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux