From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,15703e890166585c,start X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1993-08-01 02:12:01 PST Newsgroups: comp.sys.dec Path: gmd.de!xlink.net!howland.reston.ans.net!agate!boulder!buckie!DWING From: dwing@uh01.colorado.edu (Dan Wing) Subject: Re: PROBLEM: Unpriv'd user needs to exec priv'd command. Help Message-ID: <1993Aug1.085714.12277@colorado.edu> Sender: news@colorado.edu (The Daily Planet) Nntp-Posting-Host: buckie.hsc.colorado.edu Reply-To: dwing@uh01.colorado.edu Organization: University of Colorado Hospital Authority, Denver References: Date: Sun, 1 Aug 1993 08:57:14 GMT In article , 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