* Re: PROBLEM: Unpriv'd user needs to exec priv'd command. Help
[not found] <TWILLEY.93Jul31170433@dewey.nl.nuwc.navy.mil>
@ 1993-08-01 8:57 ` Dan Wing
1993-08-01 19:02 ` Paul Repacholi
1 sibling, 0 replies; 2+ messages in thread
From: Dan Wing @ 1993-08-01 8:57 UTC (permalink / raw)
In article <TWILLEY.93Jul31170433@dewey.nl.nuwc.navy.mil>,
twilley@dewey.nl.nuwc.navy.mil (Jack Twilley) writes:
>I have this user who has a need to shut down a workstation.
>Unfortunately this involved all sorts of permissions that I
>don't want to hand out.
(Later you mentioned this is a VMS workstation).
A simple solution would be to create a batch queue on that workstation,
and allow the user D (delete) access to the batch queue. Then SUBMIT/HOLD
a job there that does nothing more than something like:
$ @SYS$SYSTEM:SHUTDOWN 0 SHUTDOWN NO YES LATER YES REMOVE_NODE
The Delete access to that batch queue will allow the user to release the
batch job whever he/she wants to shutdown the node. The various parameters
control how SHUTDOWN shuts down the system (this is from an old .COM file of
mine, and you would have to ensure that your version of VMS agrees with
this ordering of commands).
>I heard n'th-hand that it is possible to install an image with
>the appropriate priv's. I could easily write a bit of C code
>that would call the shutdown routine iff it was the proper
>user/wkstation combination.
To (properly) shutdown a machine you need to execute SHUTDOWN.COM. You could,
I suppose, install an image with privileges and have the image spawn a
privileged subprocess that executes SYS$SYSTEM:SHUTDOWN.COM, but it is
difficult to ensure the security of such a solution (a user could spoof
the logical SYS$SYSTEM:, or commands executed by SHUTDOWN.COM, to cause
something else to occur).
>Is this the best way to perform this task?
Another method might be a Captive username that has sufficient privileges
but can only run SYS$SYSTEM:SHUTDOWN.COM. You'd have to ensure the
proper Workstation was being shutdown, though. A username like "nodeSHUT",
one for each of your nodes, would work pretty well.
-Dan Wing, Systems Administrator, University Hospital, Denver
dwing@uh01.colorado.edu or wing_d@ucolmcc.bitnet
^ permalink raw reply [flat|nested] 2+ messages in thread