[comp.unix.wizards] leaving users out of login group

cml@tut.cis.ohio-state.edu (Christopher Lott) (12/03/87)

Hello,

I work at OSU, and we've run into the problem of maintaining group and
passwd files that seem to grow exponentially at the beginning of each
academic quarter...  I'm sure you know how that goes.

My question:  Has  anyone tried leaving users _out_ of their login
group in /etc/group to reduce the size of the group file?  

Example:  I am cml@tut.cis.ohio-state.edu.  My passwd line on tut:
cml:0MUsin/l3Py6g:3029:10:Christopher Lott....

I am in group 10.  I also appear in the group file:
staff:*:10:.........,cml,........

Can I take myself out of the staff line in the group file 
without breaking anything?

I removed myself from the group file some time ago. So far, I have
noticed no differences.  Please note that I am asking with reference
to pyramids and suns (running yp).

Thanks in advance for any and all help.  I try to keep up with news,
so either posting or direct reply is fine.

ChrisL...
------
Christopher Lott, Department of Computer and Information Science
The Ohio State University; 2036 Neil Avenue Columbus OH 43210
cml@ohio-state.{arpa,csnet} or ...!cbosgd!osu-cis!cml
Preferred: cml@cis.ohio-state.edu

gandalf@russell.STANFORD.EDU (Juergen Wagner) (12/03/87)

You will be in a default group automatically (wheel, the first entry).
Unless you grant members of this group special access privileges to
certain files/directories ... nothing bad can happen. In fact, it is 
sufficient to put only privileged users into /etc/group.

-- 
Juergen Wagner,			        gandalf@Russell.Stanford.edu
Center for the Study of Language and Information (CSLI), Stanford CA

matt@oddjob.UChicago.EDU (Schizophrenic Solipsist) (12/03/87)

Christopher Lott writes:

) My question:  Has  anyone tried leaving users _out_ of their login
) group in /etc/group to reduce the size of the group file?  

I never include a user in the line of /etc/group which corresponds to
the group they are assigned in /etc/passwd.  No problem.
________________________________________________________
Matt	     University		matt@oddjob.uchicago.edu
Crawford     of Chicago     {astrovax,ihnp4}!oddjob!matt

rjd@occrsh.ATT.COM (12/04/87)

> My question:  Has  anyone tried leaving users _out_ of their login
> group in /etc/group to reduce the size of the group file?  

  Well, on AT&T Sys V, the group file is used just to define the
alpha string associated with the group number and for the "newgrp"
command to allow a person not logged into the group to change to that
group.  So, if you do not log into the group and need to get into the
group (and realy DO want to use "newgrp"), you must have your login id
there to accept it.
  If you log into the group, though, you are already allowed by the
passwd file entry, so the group file line does not need to have your
loginid in it, unless you newgrp away and want to newgrp back.

Randy

sdejarne@polyslo.UUCP (12/05/87)

In article <14102@oddjob.UChicago.EDU> matt@oddjob.UChicago.EDU (Schizophrenic Solipsist) writes:
>Christopher Lott writes:
>
>) My question:  Has  anyone tried leaving users _out_ of their login
>) group in /etc/group to reduce the size of the group file?  
>
>I never include a user in the line of /etc/group which corresponds to
>the group they are assigned in /etc/passwd.  No problem.

	We have never included users in the line of /etc/group that corresponds
to their login group (group defined in /etc/passwd).  We only include them in 
other groups.  Cuts down on the size of the /etc/group file.


-------------------------------------------------------------------------------
| Steve DeJarnett		|    ...!ihnp4!csun!polyslo!sdejarne	      |
| Computer Systems Lab		|    ...!{csustan,csun,sdsu}!polyslo!sdejarne |
| Cal Poly State Univ		|    ...!ucbvax!voder!polyslo!sdejarne	      |
| San Luis Obispo, CA  93407	|    					      |
-------------------------------------------------------------------------------
#include <std_disclaimer.h>

dave@lsuc.UUCP (12/08/87)

cml@tut.cis.ohio-state.edu (Christopher Lott) writes:
>
>My question:  Has  anyone tried leaving users _out_ of their login
>group in /etc/group to reduce the size of the group file?  

In v7 and any of its derivatives (perhaps all), login does not
look at /etc/group.  Your group number is set in your /etc/passwd
entry.  /etc/group is used: (a) to assign a name to that group
for purposes of ls -lg and similar needs; and (b) to permit
newgrp and similar mechanisms for changing your "current" group.
(Yes, I know 4.xBSD does this part differently.)

We have lots of users whose login names don't appear in their
group files.

David Sherman
The Law Society of Upper Canada
Toronto
-- 
{ uunet!mnetor  pyramid!utai  decvax!utcsri  ihnp4!utzoo } !lsuc!dave
Pronounce it ell-ess-you-see, please...

cball@ishmael.UUCP (12/08/87)

We have left default group entries out of /etc/group for years.  The only
potential problem is when people need to change their login group.  My
predecessor wrote a utility "chdgrp" to change default/login groups.  It
removes the username from the new default group while deleting it from the
old one.  It solves this problem while allowing users to directly change
their own login group on our BSD systems.


	Charles