"shut down" should at least log out (prohibited by multiple users)

Bug #654577 reported by hhaamu
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnome-session (Ubuntu)
Triaged
Wishlist
Unassigned

Bug Description

Binary package hint: gnome-session

When policykit prohibits shutting down (due to multiple users being logged in), the shut down function displays a dialog asking for an admin password.
However, it does _not_ log out the user _before_ showing the dialog.

Scenario:
Two users logged in, one via desktop and other via ssh. Desktop user is not an admin.
1. Desktop user tries to shut down computer.
2. Desktop user is greeted with the password dialog.
3. Desktop user freezes like a deer in headlights and goes away from the computer.
4. SSH user runs 'w' to see whether there are other people still logged in. (will shut down computer if not)
5. SSH user sees two users logged in; decides not to shut down computer.

End result: nobody shut down the computer.

I believe GNOME should log out the desktop user immediately, and pass a note to GDM saying the user wishes to shut down the computer. GDM can then display the shutdown dialog.

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: gnome-session 2.30.0-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.31-11.154-rt
Uname: Linux 2.6.31-11-rt x86_64
Architecture: amd64
Date: Mon Oct 4 17:28:44 2010
PackageArchitecture: all
ProcEnviron:
 LANG=fi_FI.utf8
 SHELL=/bin/bash
SourcePackage: gnome-session

Revision history for this message
hhaamu (hhaamu) wrote :
Revision history for this message
flipefr (flipefr) wrote :

Thank you for your bug report.
I can't recreate this either, it could be a consequence of a behaviour defined while the desktop user is connected but the ssh user still see him. Could you try the following and see what happen?

Two users logged in, one via desktop and other via ssh. Desktop user is not an admin.
1. SSH user runs 'w' to see whether there are other people still logged in.
2. SSH user sees two users logged in BUT he decides to shut down computer.
3. Something happen to SSH user
4. Desktop user tries to shut down computer.
5. Something else happen to Desktop user.

Changed in gnome-session (Ubuntu):
status: New → Incomplete
Revision history for this message
hhaamu (hhaamu) wrote :

2. SSH user sees two users logged in BUT he decides to shut down computer.
3. Something happen to SSH user

I don't see how these steps makes sense -- the ssh user can shut down fine with reboot/halt, as those tools don't use consolekit.

BTW, I meant consolekit, not policykit in the submission.

Further research:
It does not matter whether desktop user is admin or not. But it matters if the desktop user and SSH user are the same user.

Anyway, the dialog I am talking about:
System policy prevents restarting the system
when other users are logged in

An application is attempting to perform an action
that requires privileges. Authentication as the super
user is required to perform this action.

Password: [____________]

Action: org.freedesktop.consolekit.system.restart-multiple-users

[ Cancel ] [ Authenticate ]

Pressing Cancel logs out.

Revision history for this message
flipefr (flipefr) wrote :

Thanks for test it, but at the end it wasn't really necessary at all as you said. It happens since a year or more and you are not the first who report it, so I changed the status to confirmed and importance to wishlist because it is a defined behaviour in some time time in the past. Anyway someone would check it.

Thanks again for your collaboration with Ubuntu.

Changed in gnome-session (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Charlie Kravetz (cjkgeek) wrote :

Thank you for your suggestion. However, the changes you are requesting are more than a simple change and may require more discussion. I am marking this Wishlist. This does not mean your issue is not important to resolve. It simply means we will be looking at changing defaults in Ubuntu. Thanks again, and please continue to report bugs you find.

Changed in gnome-session (Ubuntu):
importance: Undecided → Wishlist
status: Confirmed → Triaged
Revision history for this message
hhaamu (hhaamu) wrote :

A simple fix would be to drop the user to GDM if shutdown is prohibited, no auth dialog shown. (This would probably be confusing for the user and needs a followup bug to fix properly)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.