I forgot to mention that the script does whatever you want it to do.  This 
could as easily be the actual shutdown command.  It doesn't have to be a 
wrapper for anything.   Our script is a menu of options.  I'd recommend (from 
experience) including a prompt that asks is this really what you want to do 
before it shuts anything down.  



Cathy
-- 
Cathy L. Smith
IT Engineer

Pacific Northwest National Laboratory
Operated by Battelle for the 
U.S. Department of Energy

Phone: 509.375.2687
Fax:       509.375.4399
Email: cathy.sm...@pnnl.gov

-----Original Message-----
From: plug-boun...@pdxlinux.org <plug-boun...@pdxlinux.org> On Behalf Of Rich 
Shepard
Sent: Wednesday, February 27, 2019 3:27 PM
To: Portland Linux/Unix Group <plug@pdxlinux.org>
Subject: Re: [PLUG] Allow user to shutdown host

On Wed, 27 Feb 2019, Smith, Cathy wrote:

> You can just set up an alias in .bashrc or whatever file is used for aliases. 
>  That's what I do for folks here.  I have a group set up for people needing 
> to use a command.  I edit the sudoers file once to set things up.  It looks 
> like
>         %hradmin  ALL=/usr/local/bin/hradmin.sh
>
> I make the hradmin group a secondary group for the user.  For example, for 
> the user account greg
>       usermod -a -G hradmin  greg
>
> Then Gregg has in his .bashrc
>       alias hradmin='sudo /usr/local/bin/hradmin.sh'

Cathy,

Thanks very much. I always learn so much from you professional system/network 
admins.

> Names have been changed to protect the innocent.

Heh!

Best regards,

Rich
_______________________________________________
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug
_______________________________________________
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to