Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#32544 - [systemd] reboot/poweroff does not work correctly
Attached to Project:
Arch Linux
Opened by Bernhard Koenig (Antunes) - Thursday, 08 November 2012, 12:57 GMT
Last edited by Dave Reisner (falconindy) - Friday, 09 November 2012, 17:57 GMT
Opened by Bernhard Koenig (Antunes) - Thursday, 08 November 2012, 12:57 GMT
Last edited by Dave Reisner (falconindy) - Friday, 09 November 2012, 17:57 GMT
|
DetailsDescription: systemd will often think that other users are logged in when they are not. This happens when some other user has been logged in before. I get this message:
systemctl reboot ==== AUTHENTICATING FOR org.freedesktop.login1.reboot-multiple-sessions === Authentication is required for rebooting the system while other users are logged in. Additional info: * package version(s) * config and/or log files etc. Steps to reproduce: 1) Login as user #1 2) Logout as user #1 3) Login as user #2 4) try "systemctl reboot" It will say that user #1 is still logged in. |
This task depends upon
Closed by Dave Reisner (falconindy)
Friday, 09 November 2012, 17:57 GMT
Reason for closing: Won't fix
Additional comments about closing: Working as intended. Commands follow policy which is configurable -- not the commands.
Friday, 09 November 2012, 17:57 GMT
Reason for closing: Won't fix
Additional comments about closing: Working as intended. Commands follow policy which is configurable -- not the commands.
Please note: there are two users, one is logged out, but the system thinks he is still logged in. I think this is not expected.
Please note that this issue is important for graphical user shutdown menus. They will not work if there is a password query.
loginctl
SESSION UID USER SEAT
1 1000 bernhard seat0
3 1001 bkoenig seat0
4 1000 bernhard seat0
3 sessions listed.
I switch back and forth between two sessions and it lists all earlier sessions.
> Would it not be possible to add an option to systemctl to override the password authentication in case earlier users are logged out by now?
If "earlier users" weren't logged in, you wouldn't have this problem. The check is done at the time of the reboot/shutdown request.
This isn't related to what systemctl can do, or should do. If you want to override the check for other users, then write a polkit rule for the policy file /usr/share/polkit-1/actions/org.freedesktop.login1.policy.
I can see now that changing the rules in polkit is a way but that would require rewriting a system file. There must be an easier way. Please note that the old way was this: https://wiki.archlinux.org/index.php/ConsoleKit#Use_D-Bus_for_power_operations
And that worked without root privileges, even if other users were logged in before.
<action id="org.freedesktop.login1.reboot-multiple-sessions">
<description>Reboot the system while other users are logged in</description>
<message>Authentication is required for rebooting the system while other users are logged in.</message>
<defaults>
<allow_any>auth_admin_keep</allow_any>
<allow_inactive>auth_admin_keep</allow_inactive>
<allow_active>auth_admin_keep</allow_active>
</defaults>
</action>
Compare this to simple 'reboot' (without multiple-sessions) and note that allow_active is set to 'yes' rathe than 'auth_admin_keep'.
I think there are bugs on that, e.g. https://bugs.archlinux.org/task/32379
1) gnome-session will just work, since it's logind aware. If you want to change the behavior so that requesting a reboot via gnome-session works, then for the third time: modify policy. You can't avoid this. Add your own override in /etc/polkit-1/rules.d
2) oblogout is an entirely separate issue because it expects consolekit to be available. Since it isn't, it needs to be adapted to make a dbus call to logind instead. Of course, if you want that to be capable of working without a password even with other users logged in, you need to modify policy.
Off the top of my head, to reboot via a dbus call to login1 is something like:
dbus-send --system --print-reply --dest=org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager.Reboot true
But this has nothing to do with this bug report.
I still believe the current behavior is unexpected and I currently see no way to reconfigure power managers under systemd (like oblogout, didn't test GNOME3) to get back their old functionality. Googling the internet, there are many bug reports on this and there will be even more when other distros switch to systemd.