Gentoo Archives: gentoo-user

From: "Jc García" <jyo.garcia@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] How to poweroff the system from user?
Date: Sat, 21 Mar 2015 20:17:27
Message-Id: CAGQH77cMh6nUJ2a7GeneQ3cUqThB55aWqbBttov_BtL8Ruv+=w@mail.gmail.com
In Reply to: Re: [gentoo-user] How to poweroff the system from user? by German
1 2015-03-21 14:01 GMT-06:00 German <gentgerman@×××××.com>:
2 > On Sat, 21 Mar 2015 15:47:16 -0400
3 > Rich Freeman <rich0@g.o> wrote:
4 >
5 >> On Sat, Mar 21, 2015 at 3:39 PM, German <gentgerman@×××××.com> wrote:
6 >> >
7 >> > No, I am trying to shutdown from a console
8 >>
9 >> Well, the old answer would be that you need to use sudo to run it, as
10 >> shutting down is a privileged operation.
11 >>
12 >> I suspect that the new answer is that with appropriate
13 >> policykit/consolekit/etc settings you can probably allow somebody
14 >> sitting at a physical console to shut down the system, or any
15 >> logged-in user if you prefer. However, I haven't actually set that up
16 >> myself.
17 >
18 > Well, I am the only one sitting at the console :) Are there any key combination which allows that? I can reboot even if I am a user with Ctrl+Alt+Delete
19 >>
20
21 Just use sudo to allow your user to shutdwon without
22 password(suders(5) manpage is your friend), and put an alias in your
23 bashrc:
24 alias poweroff="sudo /sbin/poweroff"