Hi,
I have a user id myid on an AIX 5.3 server with primary group group1 and secondary group group2. I want to execute a shell script script1 as if I am executing by an id with a user id in primary group group2.
If I have to execute script1 from the shell, i can execute the command
newgrp - group2
and run
sh script1
to get the desired results
But if script1 was called from another script, say callscript, I was not able to put the below 2 lines in callscript and get the same results
newgrp - group2
sh script1
Any ideas ??
Thanks
Philipose
I have a user id myid on an AIX 5.3 server with primary group group1 and secondary group group2. I want to execute a shell script script1 as if I am executing by an id with a user id in primary group group2.
If I have to execute script1 from the shell, i can execute the command
newgrp - group2
and run
sh script1
to get the desired results
But if script1 was called from another script, say callscript, I was not able to put the below 2 lines in callscript and get the same results
newgrp - group2
sh script1
Any ideas ??
Thanks
Philipose