getting rid of excess groups

Kevin O'Gorman kogorman at gmail.com
Sun May 12 16:50:46 UTC 2013


On Sun, May 12, 2013 at 8:37 AM, Colin Law <clanlaw at googlemail.com> wrote:

> On 12 May 2013 13:35, John R. Sowden <jsowden at americansentry.net> wrote:
> > I seem to have groups for staff, me, another user, and others above and
> > below 1000.  I would like to get rid of the ones not used, but I need to
> > know if they are used.  How do I do this?
> > Not only are they used by a program, but also are there files owned by
> those
> > groups?
>
> You can find files owned by groups easily enough [1] (google found
> that for me) but I don't know of any way to find which groups are used
> by software.  I suspect it is not possible.
>
> Colin
>
>
> [1]
> http://www.cyberciti.biz/faq/how-do-i-find-all-the-files-owned-by-a-particular-user-or-group/
>

If there are no users belonging to the group, no directories with that GID,
no files with that GID and in particular no SGID programs files belonging
to the group, it seems highly unlikely that there is anything at all that
uses the group.

It would not make sense for a program to use the numeric GID, baked into
that program, because the GID is specific to the computer it is found on.
Programs can look up the group by name, but unless it runs as superuser, it
is very difficult to use that for anything unless there are files or
directories already in existence with that GID.  It could try to change the
GID of a file it owns, but does not seem that this is being done on your
system, so I'd take it that no such program is being run.

In your situation, I'd run delgroup(8).

-- 
Kevin O'Gorman

programmer, n. an organism that transmutes caffeine into software.
Please consider the environment before printing this email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20130512/ef85d11a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 441 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20130512/ef85d11a/attachment.gif>


More information about the ubuntu-users mailing list