A question for all you UN*X experts

Neal Ziring nz at wucs.UUCP
Sat Aug 31 03:16:59 AEST 1985


In article <147 at ssc-vax.UUCP>, aims at ssc-vax.UUCP (John Daley) writes:
> 
> We have a question that maybe you can answer.  Does anyone out there know
> of any utilities that use the information in /etc/group?  We keep our file
> up to date, but have never noticed any system uses for this file.  
>  
> Just wondering...Thanx in advance!  (Please post responses in net.unix)
> 
> From the merciless keys of Ray Saddler

	The /etc/group file is the system master list of group accesses.

	For user programs, it is used for translating gid values into
	mnemonic names  (gid 100 = staff, for instance).  There are 
	library routines that open, read, and parse the file, so you will
	never see a program actually open the file "/etc/group".  The
	information about these library routines can get read in manual
	entry getgrent(3).

	The more important use of /etc/group (actually groups in a
	more general sense) is in the kernel.  You may have noticed
	by now that all files have four bits of permission related to
	user group.  When you login, or su, the program reads the 
	/etc/group file to determine what groups you are a member of, 
	and performs the system call  setgroups(2)  to tell the kernel
	that you belong to a certain list of groups (an array of gids)
	and no others.

	For further information, see  setgroups(2), access(2), 
	getgrent(3), group(5), and the source for libc.
-- 
========
...nz (ECL - we're here to provide superior computing)
	Washington University Engineering Computer Laboratory

    "Now we'll see some proper action..." 

	old style:	... ihnp4!wucs!nz
	new style:	nz at wucs.UUCP



More information about the Comp.unix.wizards mailing list