home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / unix / sys5 / r4 / 495 < prev    next >
Encoding:
Internet Message Format  |  1992-11-11  |  2.6 KB

  1. Xref: sparky comp.unix.sys5.r4:495 comp.unix.admin:6144 comp.unix.shell:4649
  2. Path: sparky!uunet!charon.amdahl.com!pacbell.com!ames!sun-barr!cs.utexas.edu!usc!sol.ctr.columbia.edu!The-Star.honeywell.com!umn.edu!uum1!ncrtimes!ncrstp!ncrlnk!ciss!cdgate!cont1!mdonaghy
  3. From: mdonaghy@cont1.Dayton.NCR.COM (Matt Donaghy)
  4. Newsgroups: att.unix.svr4,comp.unix.sys5.r4,comp.unix.admin,comp.unix.shell
  5. Subject: newgrp command
  6. Keywords: newgrp
  7. Message-ID: <682@cont1.Dayton.NCR.COM>
  8. Date: 11 Nov 92 20:10:19 GMT
  9. Reply-To: donaghym@cdsmtp.Dayton.NCR.COM (Matt Donaghy)
  10. Distribution: usa
  11. Organization: NCR Controller's Division, Dayton, Ohio
  12. Lines: 41
  13.  
  14. I know this can be accomplished but I'm not sure how to approach it.  I am
  15. running AT&T UNIX SRV4 Release 1.03.  I need to be able to change the
  16. effective group id of a user before they enter an application through a menu. 
  17. I am attempting to do this using the "newgrp" command in a script.  But, the
  18. newgrp command replaces the current shell with a new shell.  So, when the
  19. shell that runs the "newgrp" command fails it dumps them out to the prompt.
  20.  
  21. Does anyone have any ways around this?  I think you might be able to do
  22. something with the c shell but I'm not sure.  Does anyone know of a couple of
  23. quick lines in a script that would work?
  24.  
  25. Any help or suggestions are appreciated.
  26.  
  27. =============================================================================
  28. Matthew Donaghy, Technical Consultant
  29. NCR Corporation, Corporate Controller's Division ISS
  30. Dayton, OH    Phone:   (513)445-2775  Email: donaghym@cdsmtp.daytonoh.ncr.com
  31. Sender: donaghym@cdsmtp.daytonoh.ncr.com
  32. Reply-To: donaghym@cdsmtp.Dayton.NCR.COM (Matt Donaghy)
  33. Followup-To: 
  34. Distribution: usa
  35. Organization: NCR Controller's Division, Dayton, Ohio
  36. Keywords: newgrp
  37.  
  38. I know this can be accomplished but I'm not sure how to approach it.  I am
  39. running AT&T UNIX SRV4 Release 1.03.  I need to be able to change the
  40. effective group id of a user before they enter an application through a menu. 
  41. I am attempting to do this using the "newgrp" command in a script.  But, the
  42. newgrp command replaces the current shell with a new shell.  So, when the
  43. shell that runs the "newgrp" command fails it dumps them out to the prompt.
  44.  
  45. Does anyone have any ways around this?  I think you might be able to do
  46. something with the c shell but I'm not sure.  Does anyone know of a couple of
  47. quick lines in a script that would work?
  48.  
  49. Any help or suggestions are appreciated.
  50.  
  51. =============================================================================
  52. Matthew Donaghy, Technical Consultant
  53. NCR Corporation, Corporate Controller's Division ISS
  54. Dayton, OH    Phone:   (513)445-2775  Email: donaghym@cdsmtp.daytonoh.ncr.com
  55.