Gentoo Archives: gentoo-user

From: yegle <cnyegle@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] How to set-up "shutdown-only" user?
Date: Tue, 04 Dec 2012 00:17:15
Message-Id: 8F2501733EEC4961A2863A2F4CD1E06C@gmail.com
In Reply to: [gentoo-user] How to set-up "shutdown-only" user? by Jarry
1 git-shell is a good choice. And it's well tested.
2
3 You just set user's login shell to git-shell, then put some script or binary executable at user's $HOME/git-shell-commands/ directory.
4
5 --
6 yegle
7 http://about.me/yegle
8
9
10 On Monday, December 3, 2012 at 3:36 PM, Jarry wrote:
11
12 > Hi Gentoo-users,
13 >
14 > I'm facing this problem: I *have to* allow one non-root user
15 > to shutdown my server remotely (ssh). I know I could create
16 > account for him and add his login into /etc/shutdown.allow but
17 > I do not want to grant him full shell access.
18 >
19 > I thought about adding "/sbin/shutdown -a h now" as his shell
20 > into /etc/passwd so that right after he authenticates himself,
21 > shutdown is called. But I'm not sure something like this is
22 > possible (shutdown must be probably called from shel)...
23 >
24 > Or is there maybe some other way how to create very restricted
25 > account where user could not do anything else but call shutdown?
26 >
27 > Jarry
28 > --
29 > _______________________________________________________________
30 > This mailbox accepts e-mails only from selected mailing-lists!
31 > Everything else is considered to be spam and therefore deleted.
32 >
33 >