Gentoo Archives: gentoo-user

From: Matti Nykyri <matti.nykyri@×××.fi>
To: "gentoo-user@l.g.o" <gentoo-user@l.g.o>
Subject: Re: [gentoo-user] How to poweroff the system from user?
Date: Sun, 22 Mar 2015 07:34:09
Message-Id: F780F30F-A9CF-42C4-9A72-02ED61949AC2@iki.fi
In Reply to: Re: [gentoo-user] How to poweroff the system from user? by German
1 > On Mar 22, 2015, at 9:30, German <gentgerman@×××××.com> wrote:
2 >
3 > On Sun, 22 Mar 2015 03:19:50 -0400
4 > Fernando Rodriguez <frodriguez.developer@×××××××.com> wrote:
5 >
6 >>> On Sunday, March 22, 2015 3:06:59 AM German wrote:
7 >>> On Sun, 22 Mar 2015 08:49:54 +0200
8 >>> Matti Nykyri <matti.nykyri@×××.fi> wrote:
9 >>>
10 >>>>> On Mar 22, 2015, at 8:32, German <gentgerman@×××××.com> wrote:
11 >>>>>
12 >>>>>
13 >>>>> /sbin/poweroff says "Must be a superuser" :(
14 >>>>
15 >>>> Did you read any of the previous messages? They told you that you have to
16 >> have consolekit and polkit installed and configured for this to work!
17 >>>
18 >>> Yes, I've read them. However no one explianed how this has to be
19 >> accomplished with polkit and consolekit.
20 >>
21 >> You don't need those. It sounds like you somehow got both sysvinit and systemd
22 >> installed. The message you're getting is from sysvinit. poweroff should be a
23 >> symlink to systemctl. Try:
24 >>
25 >> systemctl poweroff
26 >>
27 >> You may need to unmerge sysvinit and anything else related to openrc and then
28 >> re-emerge systemd. With systemd it should either shutdown or ask you for the
29 >> root password (if you're not logged in locally or there's other users logged
30 >
31 > Thanks, I decide to go with sudo on this one. However when I try to run it, it says:
32 > "Username is not in the sudoers file." Where is this file located and how can I add the user to it? Thanks
33
34 man sudo
35
36 And
37
38 man sudoers
39
40 The file is in /etc/sudoers
41
42 --
43 -Matti