1831218 Members
2787 Online
110021 Solutions
New Discussion

newgrp command

 
SOLVED
Go to solution
Scott Van Kalken
Esteemed Contributor

newgrp command

Hey all,

I'm trying to use the newgrp command to do some dodgy stuff, not working though.

Here's what I'm trying to do:

Application 1
Application 2

Application 1 user has pri grp of app1

application 2 user has pri grp of app2

all of a sudden the business has decided to multi-skill

So.....

I can successfully use the newgrp command.

However, each application has its own very specific environment settings. I would like to be able to set this up in such a way that I can have .profile (sh-posix) that says: 1 app #1 2 app #2.

Then just run another script that has application settings, changes group and launches application.


The problem I am having is that after running the newgrp command, processing of my script seems to stop.

I an using newgrp app1
without the dash.

This is because newgrp with the dash just wants to run the profile again (which I don't want to do).

Anyone got any ideas?

Scott.
3 REPLIES 3
Wodisch
Honored Contributor

Re: newgrp command

Hello,

the simple reason is that "newgrp" starts a NEW shell!

HTH,
Wodisch
Scott Van Kalken
Esteemed Contributor

Re: newgrp command

Yup, I read through the man page.

Is there some way I can get my dodginess to work?

Scott.
Bill McNAMARA_1
Honored Contributor
Solution

Re: newgrp command

Hi Scott, I believe this is a know issue in newgrp (ie a bug)

If you d/load and install the earlier patches it should work, just make sure that you don't need their fixes..

woun't happen to be telecom stuff by any chance would it?

Bill
It works for me (tm)