<div dir="ltr">On Tue, May 14, 2013 at 7:33 PM, Ric Moore <span dir="ltr"><<a href="mailto:wayward4now@gmail.com" target="_blank">wayward4now@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="im">On 05/12/2013 04:21 PM, Tom H wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
On Sun, May 12, 2013 at 8:35 AM, John R. Sowden<br>
<<a href="mailto:jsowden@americansentry.net" target="_blank">jsowden@americansentry.net</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
I seem to have groups for staff, me, another user, and others above and<br>
below 1000. I would like to get rid of the ones not used, but I need to<br>
know if they are used. How do I do this?<br>
Not only are they used by a program, but also are there files owned by those<br>
groups?<br>
</blockquote>
<br>
You should read<br>
<br>
/usr/share/doc/base-passwd/<u></u>README<br>
/usr/share/doc/base-passwd/<u></u>users-and-groups.txt.gz<br>
<br>
before deleting any system groups.<br>
<br>
You can use<br>
<br>
for G in $(awk -F: '!/root/ {print $1}' < /etc/group) ; do find /<br>
-xdev -group "$G" ; done<br>
<br>
but it'll run find for every group on your system other than "root",<br>
so you might want to copy "/etc/group" to another file and edit some<br>
lines out - or "feed" the find command some other way.<br>
<br>
(Re-run the command if "/usr" or /var" or "..." is a separate filesystem.)<br>
</blockquote></div>
Or, he could just leave it the heck alone as it would be rare that there would be superfluous groups added. Even if one is completely idle, it wouldn't add 1/10th of a 'k' to system overhead to worry about.  The only way the OP can determine what to delete would be to comment it out, reboot and see what breaks and pray it isn't critical. <cackles> Ric<span class=""></span></blockquote>

<div><br></div><div>The total "waste" from leaving the default system groups alone is "nothing" bytes of disk (the groups themselves take 618 bytes).  Since the default block size is 4kb, and I'll lay any money you like /etc/group is under 4k for this guy, removing them saves absolutely nothing, at all.  The file will still take 4kb of disk, regardless of what ls -l tells you.<br>

<br></div><div>At any rate, the content of /etc/group doesn't "create" groups.  It's just a mapping between group ID numbers and human readable names.  Deleting group "adm" from /etc/group doesn't remove the group.  It just means files that were owned by group bin are now owned by group "2".  One can "create" a group by simply running chgrp on a file with any random number they please in place of a group name.  Removing the mapping is silly.<br>

<br></div><div>Shoot, here's an example of that:<br><br>cbell@circe:~$ touch test<br>cbell@circe:~$ ls -l test<br>-rw-rw-r-- 1 cbell cbell 0 May 15 02:48 test<br>cbell@circe:~$ sudo chgrp 1492 test<br>cbell@circe:~$ ls -l test<br>

-rw-rw-r-- 1 cbell 1492 0 May 15 02:48 test<br>cbell@circe:~$ <br><br></div><div>There, like magic, I just created a new group out of thin air!<br></div><div><br></div><div>While I'm sure the OP's question is sincere, it's one that should be met with education as to why the question is nonsensical rather than efforts to "help" do what he's asking.<br>

</div><div><br>All just my opinion, of course!<br><br></div></div>-- <br><div dir="ltr"><div>Chris<br><br></div>"If you wish to make an apple pie from scratch, you must first invent the Universe." -- Carl Sagan<br>

<div><br><br></div></div>
</div></div>