Changing GID inside csh script

E. Paul Ratazzi ratazzie at lonex.radc.af.mil
Wed May 15 04:23:05 AEST 1991


I have checked the FAQ and RTFM'ed on this one.  It seems like it should
be easy, but I'm having one heck of a time.

OS:  SunOS 4.1.1

Problem:  When a user executes our CAD software, I want all files he
creates while in the CAD software to have a group id of 'cad'.
Since these users are normally members of 'staff', the group id has to
be changed before the CAD software is executed.  I have found that this
can be done manually (and painfully) by typing 'newgrp cad' and then
starting the CAD software.

   What I would like is this group change to be automatic.  I have tried
everything I can think of from putting 'newgrp cad' in the csh script
(doesn't work because newgrp *always* gives another csh) to writing a
C code front end which calls setregid and then runs the script using
execve (doesn't work because the fact that I'm in sunview gets lost
somewhere along the line and the CAD software won't run without sunview).

Any assistance would be greatly appreciated.

TIA,

-- 
E. Paul Ratazzi                                |      ratazzie at lonex.radc.af.mil
Microelectronics Reliability Division          |            COMPMAIL:  e.ratazzi
Rome Laboratory (USAF/AFSC)                    |                  (315) 330-2946
"Exploring the Invisible Frontier"             |                    DSN 587-2946



More information about the Comp.unix.questions mailing list