tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* Setting real GID of another process
@ 1995-09-21 17:31 Nick Hill - RAL CISD Systems Group
  0 siblings, 0 replies; only message in thread
From: Nick Hill - RAL CISD Systems Group @ 1995-09-21 17:31 UTC (permalink / raw)
  To: tru64-unix-managers

Dear all,

A slightly strange request but I need to be able to do the equivalent of a
newgrp command within script files as some users need to be able to have CPU
time for different jobs accounted against different UID/GID combinations.
Executing a newgrp command in a script dosen't seem to work as as the man 
page states "the shell you were using when you issued the newgrp command is
unavailable after the newgrp command finishes" so anything in the script file 
after the newgrp command gets lost. What I need to be able to do is provide a 
utility to for an existing process to set its real and effective gid without
making the original shell "unavailable". Using setregid from a program will 
not do as you cannot give a PID to this call. I can exxamine the real and 
effective gid via the /proc filesystem or via a table call but how can I set it?

By way of explanation this is needed for jobs run via packages such as NQS or 
LSF so that users who have CPU time allocated to different projects controlled
via UNIX groups can charge time to different budgets or allocations from a 
single userid. Believe me this is really wanted at our site.

-
Nick Hill

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Computing and Information Systems Department
Rutherford Appleton Laboratory
Chilton 
Didcot                                 Internet: nmh1@axprl1.rl.ac.uk
Oxfordshire                               Janet: nmh1@uk.ac.rl.axprl1
OX11 0QX                                 DECnet: omni:.uk.ac.rl.axprl1::nmh1
ENGLAND                                          20054::nmh1
                       WWW: http://www.cis.rl.ac.uk/people/nmh1/contact.html
Tel: +44 (0)1235-445598                       
Fax: +44 (0)1235-446626
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1995-09-21 17:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-09-21 17:31 Setting real GID of another process Nick Hill - RAL CISD Systems Group

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox