[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Prevent shutdown with systemctl



Op Mon, 04 Jan 2016 20:03:33 +0100 schreef Floris <jkfloris@dds.nl>:

Op Mon, 04 Jan 2016 18:16:39 +0100 schreef Michael Biebl <biebl@debian.org>:

Am 04.01.2016 um 16:55 schrieb Floris:
Dear list,

Often there are multiple users working on my multiseat [1] system, some
of them are kids and they are not paying attention if someone else is
logged in. They can shutdown the computer even if someone else is logged
in and have an active session.

What command exactly do they use?


the power off button in gnome3.18

There is a warning that an other user is logged in, but all users are
able to shutdown/ reboot.

Is it possible that only root can shutdown/ reboot the computer if
multiple users are logged in and when there is only one user that user
is able to shutdown the computer?

That works here with the default configuration:

$ systemctl poweroff
User root is logged in on /dev/tty1.
Please retry operation after closing inhibitors and logging out other users.
Alternatively, ignore inhibitors and users with 'systemctl poweroff -i'.



In a terminal I get the expected behavior:
floris@Jessica:~$ systemctl poweroff
Operation inhibited by "julian" (PID 1246 "gnome-session-b", user julian), reason is "user session inhibited".
User julian is logged in on /dev/tty2.
Please retry operation after closing inhibitors and logging out other users.
Alternatively, ignore inhibitors and users with 'systemctl poweroff -i'.


Reply to: