Ask Your Question
0

poweroff command stopped working after upgrade to fedora24

asked 2016-07-03 11:06:43 -0600

centinel20 gravatar image

While connected through ssh I try the poweroff command on a fedora23 system and It works perfectly:

$ poweroff
==== AUTHENTICATING FOR org.freedesktop.login1.power-off ===
Authentication is required for powering off the system.
Authenticating as: Pepe (pepe)
Password: 
==== AUTHENTICATION COMPLETE ===
Connection to uriel closed by remote host.
Connection to uriel closed.

I try the same on a fedora24 system which is virtually identical and I get:

$ poweroff
Failed to set wall message, ignoring: Interactive authentication required.
Failed to power off system via logind: Interactive authentication required.
Failed to start poweroff.target: Interactive authentication required.
See system logs and 'systemctl status poweroff.target' for details.
Failed to open /dev/initctl: Permission denied
Failed to talk to init daemon.

Once I do $ sudo poweroff It works. If I type the command poweroff directly on the computer It works no problem, this only happens when connected through ssh and only on my fedora24 systems.

I look at the:

$ systemctl status poweroff.target

● poweroff.target - Power-Off
   Loaded: loaded (/usr/lib/systemd/system/poweroff.target; disabled; vendor preset: disabled)
   Active: inactive (dead)
     Docs: man:systemd.special(7)

And its the same on my fedora23 and fedora24 systems. My question is, is this the way it is going to work now? Is it a bug? Am I missing something? This started happening immediatly after I upgraded to fedora24, and I am up to date with the updates. Thanks.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
0

answered 2016-07-03 18:39:55 -0600

ssieb gravatar image

updated 2016-07-11 18:43:52 -0600

It sounds like a permissions change between F23 and F24. The current situation seems more correct. Although maybe it worked before if you connected through ssh as the user that was logged in on the console. I would not expect any user other than root (or possibly an administrator) to be able to poweroff the system remotely.

Update:

systemctl isolate poweroff and systemctl start poweroff.target work. It will ask for a password (and a user if there are multiple administrator accounts). systemctl poweroff also works, but asks twice. The poweroff command is linked to systemctl so it appears that there is a systemd bug involved. I have filed https://bugzilla.redhat.com/show_bug....

edit flag offensive delete link more

Comments

It actually asked me for the password before letting me power it off remotely. but now it doesn't ask me it just fails. It looks like its an issue with the interactive authentication.

centinel20 gravatar imagecentinel20 ( 2016-07-03 23:26:51 -0600 )edit
0

answered 2016-07-04 01:28:47 -0600

charims gravatar image

updated 2016-07-04 01:32:41 -0600

Maybe an issue with perms or policykit.

Try giving the output of

pkaction --verbose --action-id org.freedesktop.login1.power-off

Might want to check your etc dirs, here is a question that lists how to prevent the poweroff by normal users. https://ask.fedoraproject.org/en/ques...

Actually, it might be because you are trying to do it remotely. Have you tried via the local terminal? https://www.reddit.com/r/Fedora/comme...

^^^See scottchiefbaker's response.

edit flag offensive delete link more

Comments

The command poweroff works fine directly on the monitor computer without password. When I am connected through ssh it has always asked me to enter the sudo password as you can see on the outputs I provided. The problem is that it doesnt ask me for a password anymore and just fails and I have to issue the command with sudo. It doesnt bother me that much but it worked prettier before.

centinel20 gravatar imagecentinel20 ( 2016-07-04 07:48:49 -0600 )edit

fedora24:

 $ pkaction --verbose --action-id org.freedesktop.login1.power-off
 org.freedesktop.login1.power-off:
      description:       Power off the system
      message:           Authentication is required for powering off the system.
      vendor:            The systemd Project
      vendor_url:        http://www.freedesktop.org/wiki/Software/systemd
      icon:              
      implicit any:      auth_admin_keep
      implicit inactive: auth_admin_keep
      implicit active:   yes
      annotation:        org.freedesktop.policykit.imply -> org.freedesktop.login1.set-wall-message
centinel20 gravatar imagecentinel20 ( 2016-07-04 07:51:51 -0600 )edit

fedora23:

$ pkaction --verbose --action-id org.freedesktop.login1.power-off
org.freedesktop.login1.power-off:
  description:       Power off the system
  message:           Authentication is required for powering off the system.
  vendor:            The systemd Project
  vendor_url:        http://www.freedesktop.org/wiki/Software/systemd
  icon:              
  implicit any:      auth_admin_keep
  implicit inactive: auth_admin_keep
  implicit active:   yes
centinel20 gravatar imagecentinel20 ( 2016-07-04 07:53:38 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-07-03 11:06:43 -0600

Seen: 1,235 times

Last updated: Jul 11 '16