Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!spool.mu.edu!cs.umn.edu!news From: slevy@geom.umn.edu (Stuart Levy) Newsgroups: comp.sys.sgi Subject: Making multiple group-membership work Message-ID: <1991Apr20.025426.209@cs.umn.edu> Date: 20 Apr 91 02:54:26 GMT Sender: news@cs.umn.edu (News administrator) Organization: Geometry Group, University of Minnesota Lines: 25 Nntp-Posting-Host: poincare.geom.umn.edu Since IRIX 3.3 it's been possible to use the Berkeley feature where a process could belong to multiple UNIX groups simultaneously, i.e. you could always use a group-accessible file belonging to group X if /etc/group lists you as a group X member, without having to use 'newgrp' first. The only trouble was, this wasn't default behavior -- you had to run 'multgrps' to get a shell that actually belonged to all the groups you were in. This shell would of course not inherit shell variables, history, running jobs and so on from your initial login shell -- basically not too useful. After complaining to SGI & scratching head for a while I came up with the following kludge. At the top of ``/etc/cshrc'', insert something like if ( ! -f /tmp/multgrps.$$ ) then /bin/touch /tmp/multgrps.$$ && exec /bin/multgrps - endif /bin/rm -f /tmp/multgrps.$$ The /tmp file test ensures multgrps is called exactly once. (An environment variable won't do, since "multgrps -" erases its environment.) This works for csh (and tcsh) login & window shells. It's no help for /bin/sh users. Also doesn't help ftp or rsh access, but you could replace ftpd & rshd with others compiled from Berkeley sources -- from uunet.uu.net, say. Stuart