On Mon, 03 Dec 2012 21:36:01 +0100
Jarry <mr.ja...@gmail.com> wrote:

> Hi Gentoo-users,
> 
> I'm facing this problem: I *have to* allow one non-root user
> to shutdown my server remotely (ssh). I know I could create
> account for him and add his login into /etc/shutdown.allow but
> I do not want to grant him full shell access.
> 
> I thought about adding "/sbin/shutdown -a h now" as his shell
> into /etc/passwd so that right after he authenticates himself,
> shutdown is called. But I'm not sure something like this is
> possible (shutdown must be probably called from shel)...
> 
> Or is there maybe some other way how to create very restricted
> account where user could not do anything else but call shutdown?
> 
> Jarry


pdmenu

it's an ncurses menu-driven shell thingy, and you create one menu with
one command "shutdown"

The menu items calls a wrapper script that actually runs "shutdown &&
logout" so that his session isn't left hanging in mid air. We use
pdmenu extensively for the not-so-clever first line support folk and it
works well. From Windows they use PuTTY and all they see is a menu.


-- 
Alan McKinnon
alan.mckin...@gmail.com


Reply via email to