[PLUG] Allow user to shutdown host
Smith, Cathy
Cathy.Smith at pnnl.gov
Wed Feb 27 23:38:18 UTC 2019
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.smith at pnnl.gov
-----Original Message-----
From: plug-bounces at pdxlinux.org <plug-bounces at pdxlinux.org> On Behalf Of Rich Shepard
Sent: Wednesday, February 27, 2019 3:27 PM
To: Portland Linux/Unix Group <plug at 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 at pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug
More information about the PLUG
mailing list