Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!think.com!mintaka!spdcc!dirtydog.ima.isc.com!ism.isc.com!ispd-newsserver!garden.ssd.kodak.com!weimer From: weimer@garden.ssd.kodak.com (Gary Weimer (253-7796)) Newsgroups: comp.unix.questions Subject: Re: Changing GID inside csh script Message-ID: <1991May15.142045.16808@ssd.kodak.com> Date: 15 May 91 14:20:45 GMT References: <1991May14.182305.13872@lonex.radc.af.mil> Sender: news@ssd.kodak.com Reply-To: weimer@ssd.kodak.com Organization: Eastman Kodak Co.; Rochester, NY Lines: 33 In article <1991May14.182305.13872@lonex.radc.af.mil>, ratazzie@lonex.radc.af.mil (E. Paul Ratazzi) writes: |> 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). How about doing: example% chgrp cad