1 |
On Mon, 03 Dec 2012 21:36:01 +0100 |
2 |
Jarry <mr.jarry@×××××.com> wrote: |
3 |
|
4 |
> Hi Gentoo-users, |
5 |
> |
6 |
> I'm facing this problem: I *have to* allow one non-root user |
7 |
> to shutdown my server remotely (ssh). I know I could create |
8 |
> account for him and add his login into /etc/shutdown.allow but |
9 |
> I do not want to grant him full shell access. |
10 |
> |
11 |
> I thought about adding "/sbin/shutdown -a h now" as his shell |
12 |
> into /etc/passwd so that right after he authenticates himself, |
13 |
> shutdown is called. But I'm not sure something like this is |
14 |
> possible (shutdown must be probably called from shel)... |
15 |
> |
16 |
> Or is there maybe some other way how to create very restricted |
17 |
> account where user could not do anything else but call shutdown? |
18 |
> |
19 |
> Jarry |
20 |
|
21 |
|
22 |
pdmenu |
23 |
|
24 |
it's an ncurses menu-driven shell thingy, and you create one menu with |
25 |
one command "shutdown" |
26 |
|
27 |
The menu items calls a wrapper script that actually runs "shutdown && |
28 |
logout" so that his session isn't left hanging in mid air. We use |
29 |
pdmenu extensively for the not-so-clever first line support folk and it |
30 |
works well. From Windows they use PuTTY and all they see is a menu. |
31 |
|
32 |
|
33 |
-- |
34 |
Alan McKinnon |
35 |
alan.mckinnon@×××××.com |