Gentoo Archives: gentoo-user

From: Neil Bothwick <neil@××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] shutdown for non-root users?
Date: Mon, 10 Mar 2014 23:34:31
Message-Id: 20140310233422.43f01c77@digimed.co.uk
In Reply to: [gentoo-user] shutdown for non-root users? by Jarry
1 On Mon, 10 Mar 2014 21:15:13 +0100, Jarry wrote:
2
3 > how can I allow other (not-root) users to shut down system?
4 >
5 > I tried to add them to /etc/shutdown.allow but it works only
6 > for "Ctrl-Alt-Del". When they try shutdown per command line
7 > (/sbin/shutdown -a -h now) they still get:
8 >
9 > shutdown: you must be root to do that!
10 > Usage: ...
11 >
12 > Is there any way to achieve this without installing sudo?
13
14 Yes, but why do things the hard way when this is exactly the type of
15 situation tat sudo is designed to handle. Allow selected, or all, users
16 to run sudo shutdown without a password and set up an alias from shutdown
17 to sudo /sbin/shutdown.
18
19
20 --
21 Neil Bothwick
22
23 A real programmer never documents his code.
24 It was hard to make, it should be hard to read

Attachments

File name MIME type
signature.asc application/pgp-signature