On Wed, 10 May 2006, Chuck Anderson wrote:
On Wed, May 10, 2006 at 02:20:29PM -0400, Jamie Guinan wrote:
But what really struck me was "Wow, what a horrible interface! You actually have to specify the full list of groups the user already belongs to, _plus_ the new group?!".
Not Fedora's usermod:
usermod(8)
-G, --groups GROUP1[,GROUP2,...[,GROUPN]]] A list of supplementary groups which the user is also a member of. Each group is separated from the next by a comma, with no intervening whitespace. The groups are subject to the same restrictions as the group given with the -g option. If the user is currently a member of a group which is not listed, the user will be removed from the group. This behaviour can be changed via -a option, which appends user to the current supplementary group list.
If I understand this correctly, the default behavior is that you're removed from every group _not_ listed, unless you notice the part about "-a". Seems backwards, I'd much rather have append by default, with a "-d" to delete from not-listed groups. I think its much more likely that I'm a member of 10 groups and I wanted to be added to an 11th, rather than add me to a single group and bump me from the 10 I'm already in. I'm sure there's plenty of admin scripts that depend on the current behavior, though. -Jamie