GNOME Bugzilla – Bug 662813
Prevent halting/restarting from gdm when switching users
Last modified: 2018-05-24 10:38:17 UTC
GNOME version 3.2.0 Distribution: openSUSE 11.4 At present the situation is that if an user A locks his session, anyone else (say user X who also has physical access to the computer) can still opt to "switch user", go to the gdm login screen, and then, from there choose to halt/restart the system without so much as a warning about another session running in the background. This is a big inadequacy in my opinion and perhaps also a security risk. I suggest that the halt/restart buttons be disabled completely and not shown on the gdm shell when it is presented to a user upon choosing to "switch user" while another user session is logged in.
We are calling ConsoleKit methods to power off or restart the machine. ConsoleKit has different PolicyKit actions for these, depending on whether there are multiple users logged in or not. By adjusting the PolicyKit policy on your system you can simply forbid these actions while multiple users are logged in, or require the root password.
Matthias, The situation is maybe slighty different than expected. While logged in in GNOME3 (and a 'root session on a different TTY running), choosing to shutdown gives a dialog with a warning that other users are logged in. Switching to gdm (switch user), and choosing shutdown there, does not give any warning. A polkit auth dialog for shutdown on the local console is useless: the power button is in reach of the user anyway.. so the feature is more supposed to be an 'information' to the user initiating the shutdown than an attempt in blocking him (which can't succeed)
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gdm/issues/80.