Thanks to Jay Lessert who got me a working solution...
Thanks to everyone else who had things to check...
The trick has nothing to do with newgrp, rather, you have to change the group of the
parent directory and then set the group sticky bit for that directory. Any files or
directories created under the parent directory will be set so that the group is that
of the parent...
 mkdir users
 chgrp bin users
 chmod g+s users
 ls -l users
drwxr-sr-x 1 kevin bin 512 users
 cd users
 touch test
 ls -l test
-rwxr-xr-x 1 kevin bin 0 test
 mkdir dir
 ls -ld dir
drwxr-sr-x 1 kevin bin 512 dir
Here is my original post:
> I have a group of users that need to change group and then execute a script or
> set of commands right afterwards whenever they are working on a certain project.
> The newgrp command fires off a new shell so it cannot be placed in the middle
> of a script.
> Does anyone know of another way to change a user's group on the fly that doesn't
> start another shell?
System Administrator, Webmaster, and Perpetual Student.
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:14:08 CDT