getting rid of excess groups
Ric Moore
wayward4now at gmail.com
Wed May 15 00:33:06 UTC 2013
On 05/12/2013 04:21 PM, Tom H wrote:
> On Sun, May 12, 2013 at 8:35 AM, 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 should read
>
> /usr/share/doc/base-passwd/README
> /usr/share/doc/base-passwd/users-and-groups.txt.gz
>
> before deleting any system groups.
>
> You can use
>
> for G in $(awk -F: '!/root/ {print $1}' < /etc/group) ; do find /
> -xdev -group "$G" ; done
>
> but it'll run find for every group on your system other than "root",
> so you might want to copy "/etc/group" to another file and edit some
> lines out - or "feed" the find command some other way.
>
> (Re-run the command if "/usr" or /var" or "..." is a separate filesystem.)
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
--
My father, Victor Moore (Vic) used to say:
"There are two Great Sins in the world...
..the Sin of Ignorance, and the Sin of Stupidity.
Only the former may be overcome." R.I.P. Dad.
http://linuxcounter.net/user/44256.html
More information about the ubuntu-users
mailing list