Gentoo Archives: gentoo-user

From: German <gentgerman@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] How to poweroff the system from user?
Date: Sun, 22 Mar 2015 07:55:43
Message-Id: 20150322035532.246d9c81679e2eaadad47a7b@gmail.com
In Reply to: Re: [gentoo-user] How to poweroff the system from user? by Fernando Rodriguez
1 On Sun, 22 Mar 2015 03:35:49 -0400
2 Fernando Rodriguez <frodriguez.developer@×××××××.com> wrote:
3
4 > On Sunday, March 22, 2015 3:30:49 AM German wrote:
5 > > On Sun, 22 Mar 2015 03:19:50 -0400
6 > > Fernando Rodriguez <frodriguez.developer@×××××××.com> wrote:
7 > >
8 > > > On Sunday, March 22, 2015 3:06:59 AM German wrote:
9 > > > > On Sun, 22 Mar 2015 08:49:54 +0200
10 > > > > Matti Nykyri <matti.nykyri@×××.fi> wrote:
11 > > > >
12 > > > > > > On Mar 22, 2015, at 8:32, German <gentgerman@×××××.com> wrote:
13 > > > > > >
14 > > > > > >
15 > > > > > > /sbin/poweroff says "Must be a superuser" :(
16 > > > > >
17 > > > > > Did you read any of the previous messages? They told you that you have
18 > to
19 > > > have consolekit and polkit installed and configured for this to work!
20 > > > >
21 > > > > Yes, I've read them. However no one explianed how this has to be
22 > > > accomplished with polkit and consolekit.
23 > > >
24 > > > You don't need those. It sounds like you somehow got both sysvinit and
25 > systemd
26 > > > installed. The message you're getting is from sysvinit. poweroff should be
27 > a
28 > > > symlink to systemctl. Try:
29 > > >
30 > > > systemctl poweroff
31 > > >
32 > > > You may need to unmerge sysvinit and anything else related to openrc and
33 > then
34 > > > re-emerge systemd. With systemd it should either shutdown or ask you for
35 > the
36 > > > root password (if you're not logged in locally or there's other users
37 > logged
38 > >
39 > > Thanks, I decide to go with sudo on this one. However when I try to run it,
40 > it says:
41 > > "Username is not in the sudoers file." Where is this file located and how can
42 > I add the user to it? Thanks
43 > >
44 > > > in).
45 > > >
46 > >
47 > >
48 > >
49 >
50 > See man sudo.
51
52 It is huge and my head is spinning. A simple search on the web showed that I had just to add one line to "sudoers" file.
53 Now I am able to poweroff with sudo.
54
55
56 But the advice you're getting is for openrc (it will work until
57 > something else breaks), you need to remove all openrc components and install
58 > systemd properly.
59
60 Why is openRC is installed at all if I need to remove it?
61
62 > --
63 > Fernando Rodriguez
64 >
65
66
67 --