Xref: utzoo comp.unix.questions:4795 comp.unix.wizards:5745
Path: utzoo!mnetor!uunet!husc6!think!ames!ptsfa!ihnp4!cbosgd!osu-cis!dsacg1!dlag1!fm06222
From: fm06222@dlag1.UUCP (Bill Wallace)
Newsgroups: comp.unix.questions,comp.unix.wizards
Subject: Re: Setting up groups
Message-ID: <299@dlag1.UUCP>
Date: 14 Dec 87 18:13:05 GMT
References: <4718@well.UUCP>
Organization: HQ Defense Logistics Agency/DASC, Cameron Station, VA
Lines: 32
Summary: difference between group definitions

In article <4718@well.UUCP>, samlb@well.UUCP (Samuel B. Bassett) writes:
> 	I know how to create groups -- add an entry for the group name,
> password, group number, and a comma-delimited member list in /etc/group.

      Yes, this is the only way to assign a user to a group.  

> 	I know how to assign a given user to _one_ group -- put the group 
> number in the 4th column of his/her/its entry in /etc/passwd.

      This doesn't actually assign the user to a group.  It is used when
the user creates a file.  The group associated with that file will be the
one in the /etc/passwd entry.  (Even if there is no corresponding entry
in /etc/group.)  This group doesn't *have* to include the user!  (Though
it almost always does.)

> 	But if I want to have users be in _two_ or more groups (so they can read
> and write files in several different areas, I don't know how to do it.

      Adding a user's login name to the /etc/group entries will probably
do what you want.  The only problem will be if the person needs to create 
files with more than one type of group ownership.  They can use chgrp or
the user.group form of chown to make the change - unless you've locked
the user out of these commands.  It might be preferrable if they create
the file in their $HOME and cp it into a directory with the proper group
ownership.  This has the added benefit of keeping a group's files in one
place, away from the clutter of the user's $HOME.

-- 
*  Bill Wallace     {seismo!gould,cbosgd!osu-cis}!dsacg1!dlag1!bwallace  *
*  Administrative Support Center  (DASC-ZWC)      phone  (202) 274-9336  *
*  Cameron Station  Room 4C652                    Autovon      284-9336  *
*  Alexandria,  VA  22304                                                *